@@ -144,6 +144,7 @@ private void LoadConfig() {
144
144
145
145
menuItemCompressImages . IsEnabled = XCompress . IsAvailable ;
146
146
menuItemCompressImages . IsChecked = Config . CompressImages ;
147
+ menuItemPremultiply . IsChecked = Config . PremultiplyAlpha ;
147
148
menuItemCompletionSound . IsChecked = Config . CompletionSound ;
148
149
menuItemAutoCloseProgress . IsChecked = Config . AutoCloseProgress ;
149
150
menuItemAutoCloseDropProgress . IsChecked = Config . AutoCloseDropProgress ;
@@ -251,7 +252,7 @@ private void OnExtract(object sender, RoutedEventArgs e) {
251
252
Processing . ExtractSingleFile ( input , output ) ;
252
253
} ) ;
253
254
}
254
- Processing . StartProgressThread ( this , "Extracting..." , Config . AutoCloseProgress , Config . CompressImages , Config . CompletionSound , thread ) ;
255
+ Processing . StartProgressThread ( this , "Extracting..." , Config . AutoCloseProgress , Config . CompressImages , Config . CompletionSound , Config . PremultiplyAlpha , thread ) ;
255
256
}
256
257
private void OnExtractModeChanged ( object sender , SelectionChangedEventArgs e ) {
257
258
if ( ! loaded )
@@ -374,7 +375,7 @@ private void OnConvert(object sender, RoutedEventArgs e) {
374
375
Processing . ConvertSingleFile ( input , output ) ;
375
376
} ) ;
376
377
}
377
- Processing . StartProgressThread ( this , "Converting..." , Config . AutoCloseProgress , Config . CompressImages , Config . CompletionSound , thread ) ;
378
+ Processing . StartProgressThread ( this , "Converting..." , Config . AutoCloseProgress , Config . CompressImages , Config . CompletionSound , Config . PremultiplyAlpha , thread ) ;
378
379
}
379
380
private void OnConvertModeChanged ( object sender , SelectionChangedEventArgs e ) {
380
381
if ( ! loaded )
@@ -471,7 +472,7 @@ private void OnBackup(object sender, RoutedEventArgs e) {
471
472
Thread thread = new Thread ( ( ) => {
472
473
Processing . BackupFiles ( input , output ) ;
473
474
} ) ;
474
- Processing . StartProgressThread ( this , "Backing Up..." , Config . AutoCloseProgress , Config . CompressImages , Config . CompletionSound , thread ) ;
475
+ Processing . StartProgressThread ( this , "Backing Up..." , Config . AutoCloseProgress , Config . CompressImages , Config . CompletionSound , Config . PremultiplyAlpha , thread ) ;
475
476
}
476
477
private void OnRestore ( object sender , RoutedEventArgs e ) {
477
478
string input = Config . Backup . FolderBackup ;
@@ -495,7 +496,7 @@ private void OnRestore(object sender, RoutedEventArgs e) {
495
496
Thread thread = new Thread ( ( ) => {
496
497
Processing . RestoreFiles ( input , output ) ;
497
498
} ) ;
498
- Processing . StartProgressThread ( this , "Restoring..." , Config . AutoCloseProgress , Config . CompressImages , Config . CompletionSound , thread ) ;
499
+ Processing . StartProgressThread ( this , "Restoring..." , Config . AutoCloseProgress , Config . CompressImages , Config . CompletionSound , Config . PremultiplyAlpha , thread ) ;
499
500
}
500
501
private void OnBackupChangeContent ( object sender , RoutedEventArgs e ) {
501
502
System . Windows . Forms . FolderBrowserDialog dialog = new System . Windows . Forms . FolderBrowserDialog ( ) ;
@@ -556,7 +557,7 @@ private void OnRunScript(object sender, RoutedEventArgs e) {
556
557
thread = new Thread ( ( ) => {
557
558
Processing . RunScript ( input ) ;
558
559
} ) ;
559
- Processing . StartProgressThread ( this , "Running Script..." , Config . AutoCloseProgress , Config . CompressImages , Config . CompletionSound , thread ) ;
560
+ Processing . StartProgressThread ( this , "Running Script..." , Config . AutoCloseProgress , Config . CompressImages , Config . CompletionSound , Config . PremultiplyAlpha , thread ) ;
560
561
}
561
562
private void OnChangeScript ( object sender , RoutedEventArgs e ) {
562
563
OpenFileDialog dialog = new OpenFileDialog ( ) ;
@@ -648,7 +649,7 @@ private void OnFileDrop(object sender, DragEventArgs e) {
648
649
Thread thread = new Thread ( ( ) => {
649
650
Processing . ProcessDropFiles ( extractFiles . ToArray ( ) , convertFiles . ToArray ( ) , scriptFiles . ToArray ( ) ) ;
650
651
} ) ;
651
- Processing . StartProgressThread ( this , "Processing Drop Files..." , Config . AutoCloseDropProgress , Config . CompressImages , Config . CompletionSound , thread ) ;
652
+ Processing . StartProgressThread ( this , "Processing Drop Files..." , Config . AutoCloseDropProgress , Config . CompressImages , Config . CompletionSound , Config . PremultiplyAlpha , thread ) ;
652
653
}
653
654
}
654
655
}
@@ -730,6 +731,11 @@ private void OnExit(object sender, RoutedEventArgs e) {
730
731
Close ( ) ;
731
732
}
732
733
734
+ private void OnPremultiplyAlphaChecked ( object sender , RoutedEventArgs e ) {
735
+ if ( ! loaded )
736
+ return ;
737
+ Config . PremultiplyAlpha = menuItemPremultiply . IsChecked ;
738
+ }
733
739
private void OnCompressImagesChecked ( object sender , RoutedEventArgs e ) {
734
740
if ( ! loaded )
735
741
return ;
0 commit comments