mirror of
https://github.com/Tichau/FileConverter.git
synced 2026-11-22 18:41:48 +01:00
Add clamp to power of 2 option (for jpg and png conversion)
This commit is contained in:
1 parent
ffc81bc378
commit
347d34ff28
2 files changed
+12
No files matched your search
@@ -423,6 +423,7 @@ namespace FileConverter
|
||||
{
|
||||
case ConversionPreset.ConversionSettingKeys.ImageQuality:
|
||||
case ConversionPreset.ConversionSettingKeys.ImageScale:
|
||||
case ConversionPreset.ConversionSettingKeys.ImageClampSizePowerOf2:
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -508,6 +509,7 @@ namespace FileConverter
|
||||
case OutputType.Jpg:
|
||||
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.ImageQuality, "25");
|
||||
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.ImageScale, "1");
|
||||
this.InitializeSettingsValue(ConversionPreset.ConversionSettingKeys.ImageClampSizePowerOf2, "False");
|
||||
break;
|
||||
|
||||
case OutputType.Avi:
|
||||
|
||||
@@ -247,6 +247,10 @@
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="60"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Slider x:Name="ScaleSlider" Grid.Column="0" Value="{Binding SelectedPreset.Settings, ConverterParameter=ImageScale|System.Double, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay}" Margin="0,2,0,0" VerticalAlignment="Top" IsSnapToTickEnabled="True" Minimum="0.01" Maximum="2" SmallChange="0.01" LargeChange="0.1" TickFrequency="0.01" Foreground="#004B82"/>
|
||||
<Label Grid.Column="1">
|
||||
<Label.Content>
|
||||
@@ -256,6 +260,7 @@
|
||||
</MultiBinding>
|
||||
</Label.Content>
|
||||
</Label>
|
||||
<CheckBox Grid.Row="1" Grid.Column="0" Content="Clamp to lowest power of 2 size" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=ImageClampSizePowerOf2|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
@@ -276,6 +281,10 @@
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="60"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Slider x:Name="ScaleSlider" Grid.Column="0" Value="{Binding SelectedPreset.Settings, ConverterParameter=ImageScale|System.Double, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay}" Margin="0,2,0,0" VerticalAlignment="Top" IsSnapToTickEnabled="True" Minimum="0.01" Maximum="2" SmallChange="0.01" LargeChange="0.1" TickFrequency="0.01" Foreground="#004B82"/>
|
||||
<Label Grid.Column="1">
|
||||
<Label.Content>
|
||||
@@ -285,6 +294,7 @@
|
||||
</MultiBinding>
|
||||
</Label.Content>
|
||||
</Label>
|
||||
<CheckBox Grid.Row="1" Grid.Column="0" Content="Clamp to lowest power of 2 size" IsChecked="{Binding SelectedPreset.Settings, ConverterParameter=ImageClampSizePowerOf2|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, ElementName=window, Mode=TwoWay}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
Reference in new issue
Block a user