提交 99703518 编写于 作者: N Nicke Manarin

Merge branch 'dev'

namespace ScreenToGif.Domain.Enums;
public enum SupportedFFmpegVersions
{
Version6 = 0,
Version5,
Version4,
}
\ No newline at end of file
......@@ -1544,6 +1544,12 @@ public class UserSettings : INotifyPropertyChanged
set => SetValue(value);
}
public SupportedFFmpegVersions FfmpegVersion
{
get => (SupportedFFmpegVersions)GetValue();
set => SetValue(value);
}
public string GifskiLocation
{
get => (string)GetValue();
......@@ -2039,6 +2045,12 @@ public class UserSettings : INotifyPropertyChanged
set => SetValue(value);
}
public Color FreeTextBackgroundColor
{
get => (Color)GetValue();
set => SetValue(value);
}
public TextAlignment FreeTextTextAlignment
{
get => (TextAlignment)GetValue();
......
......@@ -1093,6 +1093,7 @@
<s:String x:Key="S.Caption.Weight">الوزن:</s:String>
<s:String x:Key="S.Caption.Size">الحجم:</s:String>
<s:String x:Key="S.Caption.Color">اللون:</s:String>
<s:String x:Key="S.Caption.BackgroundColor">لون الخلفية:</s:String>
<s:String x:Key="S.Caption.Outline">خط خارجي</s:String>
<s:String x:Key="S.Caption.Thickness">سمك:</s:String>
<s:String x:Key="S.Caption.Layout">تخطيط</s:String>
......
......@@ -1093,6 +1093,7 @@
<s:String x:Key="S.Caption.Weight">Tloušťka:</s:String>
<s:String x:Key="S.Caption.Size">Velikost:</s:String>
<s:String x:Key="S.Caption.Color">Barva:</s:String>
<s:String x:Key="S.Caption.BackgroundColor">Barva pozadí:</s:String>
<s:String x:Key="S.Caption.Outline">Obrys</s:String>
<s:String x:Key="S.Caption.Thickness">Tloušťka:</s:String>
<s:String x:Key="S.Caption.Layout">Uspořádání</s:String>
......
......@@ -1317,6 +1317,7 @@
<s:String x:Key="S.Caption.Weight">Vægt:</s:String>
<s:String x:Key="S.Caption.Size">Str:</s:String>
<s:String x:Key="S.Caption.Color">Farve:</s:String>
<s:String x:Key="S.Caption.BackgroundColor">Baggrundsfarve:</s:String>
<s:String x:Key="S.Caption.Outline">Omkreds</s:String>
<s:String x:Key="S.Caption.Thickness">Tykkelse:</s:String>
<s:String x:Key="S.Caption.Layout">Placering</s:String>
......@@ -1884,4 +1885,4 @@
<s:String x:Key="S.TextDecorations.Strikethrough">Overstreg</s:String>
<s:String x:Key="S.TextDecorations.OverLine">Toplinie</s:String>
<s:String x:Key="S.TextDecorations.Baseline">Grundlinie</s:String>
</ResourceDictionary>
</ResourceDictionary>
\ No newline at end of file
......@@ -1325,6 +1325,7 @@
<s:String x:Key="S.Caption.Weight">Breite:</s:String>
<s:String x:Key="S.Caption.Size">Größe:</s:String>
<s:String x:Key="S.Caption.Color">Farbe:</s:String>
<s:String x:Key="S.Caption.BackgroundColor">Hintergrundfarbe:</s:String>
<s:String x:Key="S.Caption.Outline">Kontur</s:String>
<s:String x:Key="S.Caption.Thickness">Breite:</s:String>
<s:String x:Key="S.Caption.Layout">Position</s:String>
......@@ -1997,4 +1998,4 @@
<s:String x:Key="S.TextDecorations.Strikethrough">Durchstreichen</s:String>
<s:String x:Key="S.TextDecorations.OverLine">Überstreichen</s:String>
<s:String x:Key="S.TextDecorations.Baseline">Grundlinie</s:String>
</ResourceDictionary>
</ResourceDictionary>
\ No newline at end of file
......@@ -1165,6 +1165,7 @@
<s:String x:Key="S.Caption.Weight">Βάρος γραμματοσειράς:</s:String>
<s:String x:Key="S.Caption.Size">Μέγεθος:</s:String>
<s:String x:Key="S.Caption.Color">Χρώμα</s:String>
<s:String x:Key="S.Caption.BackgroundColor">Χρώμα του φόντου:</s:String>
<s:String x:Key="S.Caption.Outline">Περίγραμμα</s:String>
<s:String x:Key="S.Caption.Thickness">Πάχος:</s:String>
<s:String x:Key="S.Caption.Layout">Διάταξη</s:String>
......
......@@ -581,6 +581,7 @@
<s:String x:Key="S.Options.Extras.FfmpegLocation.Select">Select the location of the FFmpeg executable</s:String>
<s:String x:Key="S.Options.Extras.FfmpegLocation.File">FFmpeg executable</s:String>
<s:String x:Key="S.Options.Extras.FfmpegLocation.Invalid">The path of FFMpeg executable contains one or more invalid characters. Please, select a valid location for that executable.</s:String>
<s:String x:Key="S.Options.Extras.FfmpegVersion">FFmpeg Version</s:String>
<s:String x:Key="S.Options.Extras.GifskiLocation">Gifski location</s:String>
<s:String x:Key="S.Options.Extras.GifskiLocation.Select">Select the location of the Gifski library</s:String>
<s:String x:Key="S.Options.Extras.GifskiLocation.File">Gifski library</s:String>
......@@ -1325,6 +1326,7 @@
<s:String x:Key="S.Caption.Weight">Weight:</s:String>
<s:String x:Key="S.Caption.Size">Size:</s:String>
<s:String x:Key="S.Caption.Color">Color:</s:String>
<s:String x:Key="S.Caption.BackgroundColor">Background Color:</s:String>
<s:String x:Key="S.Caption.Outline">Outline</s:String>
<s:String x:Key="S.Caption.Thickness">Thickness:</s:String>
<s:String x:Key="S.Caption.Layout">Layout</s:String>
......
......@@ -1093,6 +1093,7 @@
<s:String x:Key="S.Caption.Weight">Peso:</s:String>
<s:String x:Key="S.Caption.Size">Tamaño:</s:String>
<s:String x:Key="S.Caption.Color">Color:</s:String>
<s:String x:Key="S.Caption.BackgroundColor">Color de fondo:</s:String>
<s:String x:Key="S.Caption.Outline">Contorno</s:String>
<s:String x:Key="S.Caption.Thickness">Grosor:</s:String>
<s:String x:Key="S.Caption.Layout">Diseño</s:String>
......
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="clr-namespace:System;assembly=mscorlib"
xml:space="preserve">
......@@ -1325,6 +1325,7 @@
<s:String x:Key="S.Caption.Weight">Paino:</s:String>
<s:String x:Key="S.Caption.Size">Koko:</s:String>
<s:String x:Key="S.Caption.Color">Väri:</s:String>
<s:String x:Key="S.Caption.BackgroundColor">Taustaväri:</s:String>
<s:String x:Key="S.Caption.Outline">Hahmotelma</s:String>
<s:String x:Key="S.Caption.Thickness">Paksuus:</s:String>
<s:String x:Key="S.Caption.Layout">Asettelu</s:String>
......
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="clr-namespace:System;assembly=mscorlib"
xml:space="preserve">
......@@ -1325,6 +1325,7 @@
<s:String x:Key="S.Caption.Weight">Bordure:</s:String>
<s:String x:Key="S.Caption.Size">Taille:</s:String>
<s:String x:Key="S.Caption.Color">Couleur:</s:String>
<s:String x:Key="S.Caption.BackgroundColor">Couleur de l'arrière plan:</s:String>
<s:String x:Key="S.Caption.Outline">Contour</s:String>
<s:String x:Key="S.Caption.Thickness">Épaisseur:</s:String>
<s:String x:Key="S.Caption.Layout">Disposition</s:String>
......
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="clr-namespace:System;assembly=mscorlib"
xml:space="preserve">
......@@ -1306,6 +1306,7 @@
<s:String x:Key="S.Caption.Weight">משקל:</s:String>
<s:String x:Key="S.Caption.Size">גודל:</s:String>
<s:String x:Key="S.Caption.Color">צבע:</s:String>
<s:String x:Key="S.Caption.BackgroundColor">צבע רקע:</s:String>
<s:String x:Key="S.Caption.Outline">מתאר</s:String>
<s:String x:Key="S.Caption.Thickness">עובי:</s:String>
<s:String x:Key="S.Caption.Layout">פריסה</s:String>
......
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="clr-namespace:System;assembly=mscorlib"
xml:space="preserve">
......@@ -1325,6 +1325,7 @@
<s:String x:Key="S.Caption.Weight">Vastagság:</s:String>
<s:String x:Key="S.Caption.Size">Méret:</s:String>
<s:String x:Key="S.Caption.Color">Szín:</s:String>
<s:String x:Key="S.Caption.BackgroundColor">Háttérszín:</s:String>
<s:String x:Key="S.Caption.Outline">Körvonal</s:String>
<s:String x:Key="S.Caption.Thickness">Vastagság:</s:String>
<s:String x:Key="S.Caption.Layout">Elrendezés</s:String>
......
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="clr-namespace:System;assembly=mscorlib"
xml:space="preserve">
......@@ -1325,6 +1325,7 @@
<s:String x:Key="S.Caption.Weight">Peso:</s:String>
<s:String x:Key="S.Caption.Size">Dimensione:</s:String>
<s:String x:Key="S.Caption.Color">Colore:</s:String>
<s:String x:Key="S.Caption.BackgroundColor">Colore di sfondo:</s:String>
<s:String x:Key="S.Caption.Outline">Contorno</s:String>
<s:String x:Key="S.Caption.Thickness">Spessore:</s:String>
<s:String x:Key="S.Caption.Layout">Disposizione</s:String>
......
......@@ -1306,6 +1306,7 @@
<s:String x:Key="S.Caption.Weight">太さ:</s:String>
<s:String x:Key="S.Caption.Size">サイズ:</s:String>
<s:String x:Key="S.Caption.Color">色:</s:String>
<s:String x:Key="S.Caption.BackgroundColor">背景色:</s:String>
<s:String x:Key="S.Caption.Outline">アウトライン</s:String>
<s:String x:Key="S.Caption.Thickness">太さ(厚さ):</s:String>
<s:String x:Key="S.Caption.Layout">レイアウト</s:String>
......@@ -1862,4 +1863,4 @@
<s:String x:Key="S.TextDecorations.Strikethrough">取り消し線</s:String>
<s:String x:Key="S.TextDecorations.OverLine">オーバーライン</s:String>
<s:String x:Key="S.TextDecorations.Baseline">ベースライン</s:String>
</ResourceDictionary>
</ResourceDictionary>
\ No newline at end of file
......@@ -1151,6 +1151,7 @@
<s:String x:Key="S.Caption.Weight">굵기:</s:String>
<s:String x:Key="S.Caption.Size">크기:</s:String>
<s:String x:Key="S.Caption.Color">색상:</s:String>
<s:String x:Key="S.Caption.BackgroundColor">배경색:</s:String>
<s:String x:Key="S.Caption.Outline">외곽선</s:String>
<s:String x:Key="S.Caption.Thickness">두께:</s:String>
<s:String x:Key="S.Caption.Layout">위치 설정</s:String>
......@@ -1505,4 +1506,4 @@
<!--Orientation-->
<s:String x:Key="S.Orientation.Horizontal">수평</s:String>
<s:String x:Key="S.Orientation.Vertical">수직</s:String>
</ResourceDictionary>
</ResourceDictionary>
\ No newline at end of file
......@@ -1325,6 +1325,7 @@
<s:String x:Key="S.Caption.Weight">Gewicht:</s:String>
<s:String x:Key="S.Caption.Size">Grootte:</s:String>
<s:String x:Key="S.Caption.Color">Kleur:</s:String>
<s:String x:Key="S.Caption.BackgroundColor">Achtergrond kleur:</s:String>
<s:String x:Key="S.Caption.Outline">Contour</s:String>
<s:String x:Key="S.Caption.Thickness">Dikte:</s:String>
<s:String x:Key="S.Caption.Layout">Opmaak</s:String>
......
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="clr-namespace:System;assembly=mscorlib"
xml:space="preserve">
......@@ -1325,6 +1325,7 @@
<s:String x:Key="S.Caption.Weight">Waga:</s:String>
<s:String x:Key="S.Caption.Size">Rozmiar:</s:String>
<s:String x:Key="S.Caption.Color">Kolor:</s:String>
<s:String x:Key="S.Caption.BackgroundColor">Kolor tła:</s:String>
<s:String x:Key="S.Caption.Outline">Kontur</s:String>
<s:String x:Key="S.Caption.Thickness">Grubość:</s:String>
<s:String x:Key="S.Caption.Layout">Układ</s:String>
......
......@@ -1325,6 +1325,7 @@
<s:String x:Key="S.Caption.Weight">Peso:</s:String>
<s:String x:Key="S.Caption.Size">Tamanho:</s:String>
<s:String x:Key="S.Caption.Color">Cor:</s:String>
<s:String x:Key="S.Caption.BackgroundColor">Cor de fundo:</s:String>
<s:String x:Key="S.Caption.Outline">Borda</s:String>
<s:String x:Key="S.Caption.Thickness">Espessura:</s:String>
<s:String x:Key="S.Caption.Layout">Posicionamento</s:String>
......
......@@ -581,6 +581,7 @@
<s:String x:Key="S.Options.Extras.FfmpegLocation.Select">Selecione a pasta de localização do executável do FFmpeg.</s:String>
<s:String x:Key="S.Options.Extras.FfmpegLocation.File">Executável do FFmpeg</s:String>
<s:String x:Key="S.Options.Extras.FfmpegLocation.Invalid">O caminho do executável FFMpeg contém um ou mais caracteres inválidos. Por favor, selecione um caminho válido para o executável.</s:String>
<s:String x:Key="S.Options.Extras.FfmpegVersion">Versão do FFmpeg</s:String>
<s:String x:Key="S.Options.Extras.GifskiLocation">Localização do Gifski</s:String>
<s:String x:Key="S.Options.Extras.GifskiLocation.Select">Selecione a localização da biblioteca Gifski</s:String>
<s:String x:Key="S.Options.Extras.GifskiLocation.File">Biblioteca Gifski</s:String>
......@@ -1325,6 +1326,7 @@
<s:String x:Key="S.Caption.Weight">Peso:</s:String>
<s:String x:Key="S.Caption.Size">Tamanho:</s:String>
<s:String x:Key="S.Caption.Color">Cor:</s:String>
<s:String x:Key="S.Caption.BackgroundColor">Cor de fundo:</s:String>
<s:String x:Key="S.Caption.Outline">Borda</s:String>
<s:String x:Key="S.Caption.Thickness">Espessura:</s:String>
<s:String x:Key="S.Caption.Layout">Posicionamento</s:String>
......
......@@ -1325,6 +1325,7 @@
<s:String x:Key="S.Caption.Weight">Начертание:</s:String>
<s:String x:Key="S.Caption.Size">Размер:</s:String>
<s:String x:Key="S.Caption.Color">Цвет:</s:String>
<s:String x:Key="S.Caption.BackgroundColor">Фоновый цвет:</s:String>
<s:String x:Key="S.Caption.Outline">Обводка</s:String>
<s:String x:Key="S.Caption.Thickness">Толщина:</s:String>
<s:String x:Key="S.Caption.Layout">Макет</s:String>
......@@ -1997,4 +1998,4 @@
<s:String x:Key="S.TextDecorations.Strikethrough">Зачеркнутый</s:String>
<s:String x:Key="S.TextDecorations.OverLine">Линия сверху</s:String>
<s:String x:Key="S.TextDecorations.Baseline">На линии</s:String>
</ResourceDictionary>
</ResourceDictionary>
\ No newline at end of file
......@@ -1093,6 +1093,7 @@
<s:String x:Key="S.Caption.Weight">Vikt:</s:String>
<s:String x:Key="S.Caption.Size">Storlek:</s:String>
<s:String x:Key="S.Caption.Color">Färg:</s:String>
<s:String x:Key="S.Caption.BackgroundColor">Bakgrundsfärg:</s:String>
<s:String x:Key="S.Caption.Outline">Översikt</s:String>
<s:String x:Key="S.Caption.Thickness">Tjocklek:</s:String>
<s:String x:Key="S.Caption.Layout">Layout</s:String>
......
......@@ -1093,6 +1093,7 @@
<s:String x:Key="S.Caption.Weight">Uzani:</s:String>
<s:String x:Key="S.Caption.Size">Ukubwa:</s:String>
<s:String x:Key="S.Caption.Color">Rangi:</s:String>
<s:String x:Key="S.Caption.BackgroundColor">Rangi ya Mandharinyuma:</s:String>
<s:String x:Key="S.Caption.Outline">Kiolezi</s:String>
<s:String x:Key="S.Caption.Thickness">Unene:</s:String>
<s:String x:Key="S.Caption.Layout">Mpangilio</s:String>
......
......@@ -1093,6 +1093,7 @@
<s:String x:Key="S.Caption.Weight">Ağırlık:</s:String>
<s:String x:Key="S.Caption.Size">Boyut:</s:String>
<s:String x:Key="S.Caption.Color">Renk:</s:String>
<s:String x:Key="S.Caption.BackgroundColor">Arka plan rengi:</s:String>
<s:String x:Key="S.Caption.Outline">Dış çizgi</s:String>
<s:String x:Key="S.Caption.Thickness">Kalınlık:</s:String>
<s:String x:Key="S.Caption.Layout">Düzen</s:String>
......@@ -1438,4 +1439,4 @@
<!--Orientation-->
<s:String x:Key="S.Orientation.Horizontal">Yatay</s:String>
<s:String x:Key="S.Orientation.Vertical">Düşey</s:String>
</ResourceDictionary>
</ResourceDictionary>
\ No newline at end of file
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="clr-namespace:System;assembly=mscorlib"
xml:space="preserve">
......@@ -1325,6 +1325,7 @@
<s:String x:Key="S.Caption.Weight">Товщина:</s:String>
<s:String x:Key="S.Caption.Size">Розмір:</s:String>
<s:String x:Key="S.Caption.Color">Колір:</s:String>
<s:String x:Key="S.Caption.BackgroundColor">Колір фону:</s:String>
<s:String x:Key="S.Caption.Outline">Контур</s:String>
<s:String x:Key="S.Caption.Thickness">Товщина:</s:String>
<s:String x:Key="S.Caption.Layout">Розташування</s:String>
......
......@@ -1093,6 +1093,7 @@
<s:String x:Key="S.Caption.Weight">Độ đậm nét:</s:String>
<s:String x:Key="S.Caption.Size">Cỡ chữ:</s:String>
<s:String x:Key="S.Caption.Color">Màu sắc:</s:String>
<s:String x:Key="S.Caption.BackgroundColor">Màu nền:</s:String>
<s:String x:Key="S.Caption.Outline">Đường bao</s:String>
<s:String x:Key="S.Caption.Thickness">Chiều dày:</s:String>
<s:String x:Key="S.Caption.Layout">Bố trí</s:String>
......
......@@ -1325,6 +1325,7 @@
<s:String x:Key="S.Caption.Weight">粗細:</s:String>
<s:String x:Key="S.Caption.Size">大小:</s:String>
<s:String x:Key="S.Caption.Color">顏色:</s:String>
<s:String x:Key="S.Caption.BackgroundColor">背景顏色:</s:String>
<s:String x:Key="S.Caption.Outline">外框</s:String>
<s:String x:Key="S.Caption.Thickness">粗細:</s:String>
<s:String x:Key="S.Caption.Layout">配置</s:String>
......
......@@ -1325,6 +1325,7 @@
<s:String x:Key="S.Caption.Weight">字重:</s:String>
<s:String x:Key="S.Caption.Size">字号:</s:String>
<s:String x:Key="S.Caption.Color">颜色:</s:String>
<s:String x:Key="S.Caption.BackgroundColor">背景颜色:</s:String>
<s:String x:Key="S.Caption.Outline">轮廓</s:String>
<s:String x:Key="S.Caption.Thickness">粗细:</s:String>
<s:String x:Key="S.Caption.Layout">布局</s:String>
......@@ -1997,4 +1998,4 @@
<s:String x:Key="S.TextDecorations.Strikethrough">删除线</s:String>
<s:String x:Key="S.TextDecorations.OverLine">上划线</s:String>
<s:String x:Key="S.TextDecorations.Baseline">底线</s:String>
</ResourceDictionary>
</ResourceDictionary>
\ No newline at end of file
......@@ -193,6 +193,7 @@
<!--Options • Extras-->
<!--<s:String x:Key="FfmpegLocation"></s:String>-->
<e:SupportedFFmpegVersions x:Key="FfmpegVersion">Version4</e:SupportedFFmpegVersions>
<!--<s:String x:Key="GifskiLocation"></s:String>-->
<!--<s:String x:Key="SharpDxLocationFolder"></s:String>-->
......@@ -291,6 +292,7 @@
<FontWeight x:Key="FreeTextFontWeight">Normal</FontWeight>
<s:Double x:Key="FreeTextFontSize">16.0</s:Double>
<Color x:Key="FreeTextFontColor">#FF000000</Color>
<Color x:Key="FreeTextBackgroundColor">#00000000</Color>
<TextAlignment x:Key="FreeTextTextAlignment">Left</TextAlignment>
<s:String x:Key="FreeTextTextDecoration">None</s:String>
<s:Boolean x:Key="IsFreeTextShadowGroupExpanded">True</s:Boolean>
......
......@@ -141,7 +141,7 @@
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<Company>Nicke Manarin</Company>
<Authors>Nicke Manarin</Authors>
<Version>2.38.1</Version>
<Version>2.39.0</Version>
<Copyright>Copyright© Nicke Manarin 2023</Copyright>
<PackageProjectUrl>https://www.screentogif.com</PackageProjectUrl>
<PackageReadmeFile>Readme.md</PackageReadmeFile>
......
......@@ -70,9 +70,9 @@
<!--Bit Level-->
<c:ExtendedCheckBox Grid.Row="5" Grid.Column="0" Margin="3,8,5,8" Text="{DynamicResource S.SaveAs.KGySoft.Quantizer.CustomBitLevel}"
ToolTip="{DynamicResource S.SaveAs.KGySoft.Quantizer.CustomBitLevel.Info}" IsChecked="{Binding IsCustomBitLevel}"
Visibility="{Binding ElementName=QuantizersComboBox, Path=SelectedItem.(vm:QuantizerDescriptor.HasBitLevel), Converter={StaticResource Bool2Visibility}}"/>
Visibility="{Binding ElementName=QuantizersComboBox, Path=SelectedItem.(vm:QuantizerDescriptor.HasBitLevel), Converter={StaticResource Bool2Visibility}, FallbackValue={x:Static Visibility.Collapsed}}"/>
<Slider Grid.Row="5" Grid.Column="1" Margin="0,3" TickPlacement="BottomRight" AutoToolTipPlacement="TopLeft"
Minimum="1" Maximum="8" TickFrequency="1" Value="{Binding BitLevel}" SmallChange="1" LargeChange="32"
Minimum="1" Maximum="8" TickFrequency="1" Value="{Binding BitLevel, FallbackValue=0}" SmallChange="1" LargeChange="32"
ToolTip="{DynamicResource S.SaveAs.KGySoft.Quantizer.BitLevel.Info}">
<Slider.Visibility>
<MultiBinding Converter="{StaticResource BoolAndToVisibility}">
......
......@@ -46,6 +46,7 @@ using Color = System.Windows.Media.Color;
using Encoder = ScreenToGif.Windows.Other.Encoder;
using LegacyGifEncoder = ScreenToGif.Util.Codification.Gif.LegacyEncoder.GifEncoder;
using KGySoftGifEncoder = KGySoft.Drawing.Imaging.GifEncoder;
using ScreenToGif.ViewModel.ExportPresets.AnimatedImage.Bpg;
namespace ScreenToGif.Util;
......@@ -1416,7 +1417,7 @@ internal class EncodingManager
var firstPass = "";
var secondPass = "";
//TODO: Adapt the code to support v4 or v6
switch (preset.Type)
{
case ExportFormats.Gif:
......@@ -1431,10 +1432,6 @@ internal class EncodingManager
firstPass = gifPreset.Parameters.Replace("\n", " ").Replace("\r", "");
else
{
//Vsync
if (gifPreset.Vsync != Vsyncs.Off)
firstPass += $"-vsync {gifPreset.Vsync.ToString().ToLower()} ";
//Input and loop.
firstPass += "{I} ";
firstPass += $"-loop {(gifPreset.Looped ? gifPreset.RepeatForever ? 0 : gifPreset.RepeatCount : -1)} ";
......@@ -1454,7 +1451,18 @@ internal class EncodingManager
firstPass += $"-r {(gifPreset.Framerate == Framerates.Custom ? gifPreset.CustomFramerate.ToString(CultureInfo.InvariantCulture) : gifPreset.Framerate.GetLowerDescription())} ";
//Format and output.
firstPass += "-f gif {O}";
firstPass += "-f gif ";
//Vsync
if (gifPreset.Vsync != Vsyncs.Off)
{
if (UserSettings.All.FfmpegVersion == SupportedFFmpegVersions.Version6)
firstPass += "-fps_mode " + gifPreset.Vsync.GetLowerDescription();
else
firstPass += "-vsync " + gifPreset.Vsync.GetLowerDescription();
}
firstPass += " {O}";
}
break;
......@@ -1473,10 +1481,6 @@ internal class EncodingManager
firstPass = apngPreset.Parameters.Replace("\n", " ").Replace("\r", "");
else
{
//Vsync
if (apngPreset.Vsync != Vsyncs.Off)
firstPass += $"-vsync {apngPreset.Vsync.ToString().ToLower()} ";
//Input and loop.
firstPass += "{I} ";
firstPass += $"-plays {(apngPreset.Looped ? apngPreset.RepeatForever ? 0 : apngPreset.RepeatCount : -1)} ";
......@@ -1494,7 +1498,18 @@ internal class EncodingManager
firstPass += $"-r {(apngPreset.Framerate == Framerates.Custom ? apngPreset.CustomFramerate.ToString(CultureInfo.InvariantCulture) : apngPreset.Framerate.GetLowerDescription())} ";
//Format and output.
firstPass += "-f apng {O}";
firstPass += "-f apng ";
//Vsync
if (apngPreset.Vsync != Vsyncs.Off)
{
if (UserSettings.All.FfmpegVersion == SupportedFFmpegVersions.Version6)
firstPass += "-fps_mode " + apngPreset.Vsync.GetLowerDescription();
else
firstPass += "-vsync " + apngPreset.Vsync.GetLowerDescription();
}
firstPass += " {O}";
}
break;
......@@ -1540,7 +1555,18 @@ internal class EncodingManager
firstPass += $"-r {(webpPreset.Framerate == Framerates.Custom ? webpPreset.CustomFramerate.ToString(CultureInfo.InvariantCulture) : webpPreset.Framerate.GetLowerDescription())} ";
//Format and output.
firstPass += "-f webp {O}";
firstPass += "-f webp ";
//Vsync
if (webpPreset.Vsync != Vsyncs.Off)
{
if (UserSettings.All.FfmpegVersion == SupportedFFmpegVersions.Version6)
firstPass += "-fps_mode " + webpPreset.Vsync.GetLowerDescription();
else
firstPass += "-vsync " + webpPreset.Vsync.GetLowerDescription();
}
firstPass += " {O}";
}
break;
......@@ -1571,10 +1597,6 @@ internal class EncodingManager
}
else
{
//Vsync
if (videoPreset.Vsync != Vsyncs.Off)
firstPass += $"-vsync {videoPreset.Vsync.ToString().ToLower()} ";
//Hardware acceleration.
if (videoPreset.HardwareAcceleration != HardwareAccelerationModes.Off)
firstPass += "-hwaccel auto ";
......@@ -1649,7 +1671,17 @@ internal class EncodingManager
//Format and output.
firstPass += $"-f {preset.Type.ToString().ToLower().Replace("mkv", "matroska")} ";
firstPass += "{O}";
//Vsync
if (videoPreset.Vsync != Vsyncs.Off)
{
if (UserSettings.All.FfmpegVersion == SupportedFFmpegVersions.Version6)
firstPass += "-fps_mode " + videoPreset.Vsync.GetLowerDescription();
else
firstPass += "-vsync " + videoPreset.Vsync.GetLowerDescription();
}
firstPass += " {O}";
//Second pass, using a similar command with some adjustments.
if (videoPreset.Pass > 1)
......
......@@ -1435,7 +1435,8 @@
FontStyle="{Binding ElementName=FreeTextFontStyleComboBox, Path=SelectedValue}"
FontWeight="{Binding ElementName=FreeTextFontWeightComboBox, Path=SelectedValue}"
FontSize="{Binding ElementName=FreeTextFontSizeNumericUpDown, Path=Value}"
Foreground="{Binding ElementName=FreeTextFontColorBox, Path=SelectedBrush}">
Foreground="{Binding ElementName=FreeTextFontColorBox, Path=SelectedBrush}"
Background="{Binding ElementName=FreeTextBackgroundColorBox, Path=SelectedBrush}">
<TextBlock.Resources>
<c:DoubleToBool x:Key="DoubleToBool"/>
<DropShadowEffect x:Key="DropShadowEffect"
......@@ -2119,6 +2120,7 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
......@@ -2193,8 +2195,12 @@
<n:ColorBox Grid.Row="4" Grid.Column="1" x:Name="FreeTextFontColorBox" Margin="10,5"
SelectedColor="{Binding FreeTextFontColor, Source={x:Static t:UserSettings.All}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
<TextBlock Grid.Row="5" Grid.Column="0" Text="{DynamicResource S.Caption.TextDecoration}" VerticalAlignment="Center" Foreground="{DynamicResource Element.Foreground.Medium}"/>
<ComboBox Grid.Row="5" Grid.Column="1" x:Name="FreeTextTextDecorationComboBox" Margin="10,5" MinWidth="100"
<TextBlock Grid.Row="5" Grid.Column="0" Text="{DynamicResource S.Caption.BackgroundColor}" VerticalAlignment="Center" Foreground="{DynamicResource Element.Foreground.Medium}"/>
<n:ColorBox Grid.Row="5" Grid.Column="1" x:Name="FreeTextBackgroundColorBox" Margin="10,5"
SelectedColor="{Binding FreeTextBackgroundColor, Source={x:Static t:UserSettings.All}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
<TextBlock Grid.Row="6" Grid.Column="0" Text="{DynamicResource S.Caption.TextDecoration}" VerticalAlignment="Center" Foreground="{DynamicResource Element.Foreground.Medium}"/>
<ComboBox Grid.Row="6" Grid.Column="1" x:Name="FreeTextTextDecorationComboBox" Margin="10,5" MinWidth="100"
SelectedValuePath="Tag" SelectedValue="{Binding Source={x:Static t:UserSettings.All}, Path=FreeTextTextDecoration, Mode=TwoWay}">
<ComboBox.ItemTemplate>
<DataTemplate>
......
......@@ -333,7 +333,8 @@ namespace ScreenToGif.Windows
ZoomBoxControl.RefreshImage();
Cancel_Executed(sender, null);
if (e.OriginalSource is not Image)
Cancel_Executed(sender, null);
}
private void Window_Closing(object sender, CancelEventArgs e)
......
......@@ -1564,8 +1564,16 @@
ToolTip="{DynamicResource S.Options.Storage.Paths.Browse}" ToolTipService.Placement="Top" ToolTipService.HorizontalOffset="-5" Command="{StaticResource Command.BrowseFfmpeg}"/>
</Grid>
<n:LabelSeparator Grid.Row="4" Text="{DynamicResource S.Options.Extras.GifskiLocation}"/>
<Grid Grid.Row="5">
<n:LabelSeparator Grid.Row="4" Text="{DynamicResource S.Options.Extras.FfmpegVersion}"/>
<ComboBox Grid.Row="5" Margin="10,3,0,3" MinWidth="120" VerticalAlignment="Center" HorizontalAlignment="Left"
SelectedIndex="{Binding Path=FfmpegVersion, Converter={StaticResource EnumToInt}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
<ComboBoxItem Content="v6"/>
<ComboBoxItem Content="v5"/>
<ComboBoxItem Content="v4"/>
</ComboBox>
<n:LabelSeparator Grid.Row="6" Text="{DynamicResource S.Options.Extras.GifskiLocation}"/>
<Grid Grid.Row="7">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="30"/>
......
......@@ -1681,7 +1681,7 @@ public partial class Options : Window, INotification
{
#region FFmpeg
if (Util.Other.IsFfmpegPresent(true, true))
if (Util.Other.IsFfmpegPresent(true, false))
{
var info = new FileInfo(Util.Other.AdjustPath(UserSettings.All.FfmpegLocation));
info.Refresh();
......@@ -1702,7 +1702,7 @@ public partial class Options : Window, INotification
{
#region Gifski
if (Util.Other.IsGifskiPresent(true, true))
if (Util.Other.IsGifskiPresent(true, false))
{
var info = new FileInfo(Util.Other.AdjustPath(UserSettings.All.GifskiLocation));
info.Refresh();
......
using ScreenToGif.Domain.Enums;
using System;
using System.Collections.Generic;
using System.Diagnostics;
......@@ -817,11 +818,12 @@ public partial class VideoSource : Window
var info = new ProcessStartInfo(UserSettings.All.FfmpegLocation)
{
Arguments = $" -i \"{VideoPath}\" -vsync 2 -progress pipe:1 -vf scale={VideoWidth}:{VideoHeight} -ss {start:hh\\:mm\\:ss\\.fff} -to {end:hh\\:mm\\:ss\\.fff} -hide_banner -c:v png -r {fps} -vframes {count} \"{path}\"",
Arguments = $" -i \"{VideoPath}\" -progress pipe:1 -vf scale={VideoWidth}:{VideoHeight} -ss {start:hh\\:mm\\:ss\\.fff} -to {end:hh\\:mm\\:ss\\.fff} -hide_banner -c:v png -r {fps} -vframes {count} \"{path}\"",
CreateNoWindow = true,
ErrorDialog = false,
UseShellExecute = false,
RedirectStandardOutput = true
RedirectStandardOutput = true,
RedirectStandardError = true
};
_process = new Process();
......@@ -844,18 +846,18 @@ public partial class VideoSource : Window
break;
}
};
_process.ErrorDataReceived += (sender, e) =>
{
if (!string.IsNullOrEmpty(e.Data))
throw new Exception("Error while capturing frames with FFmpeg.") { HelpLink = $"Command:\n\r{info.Arguments}\n\rResult:\n\r{e.Data}" };
};
_process.StartInfo = info;
_process.Start();
_process.BeginOutputReadLine();
await _process.WaitForExitAsync();
var error = await _process?.StandardError?.ReadToEndAsync();
if (!string.IsNullOrWhiteSpace(error))
throw new Exception("Error while capturing frames with FFmpeg.") { HelpLink = $"Command:\n\r{info.Arguments}\n\rResult:\n\r{error}" };
}
catch (Exception e)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册