From 6cfa2f61ad6e4d916252d0a7f75e67483bc3a218 Mon Sep 17 00:00:00 2001 From: Robert Bilski Date: Fri, 15 Sep 2023 00:09:56 +0200 Subject: [PATCH 1/5] Add ability to set background color for Free Text in the Editor I often find the need to annotate elements on the screen, but it's difficult on backgrounds that aren't uniform. This adds ability to control background property on FreeText textbox. --- ScreenToGif.Util/Settings/UserSettings.cs | 6 ++++++ .../Resources/Localization/StringResources.ar.xaml | 1 + .../Resources/Localization/StringResources.cs.xaml | 1 + .../Resources/Localization/StringResources.da.xaml | 3 ++- .../Resources/Localization/StringResources.de.xaml | 3 ++- .../Resources/Localization/StringResources.el.xaml | 1 + .../Resources/Localization/StringResources.en.xaml | 1 + .../Localization/StringResources.es-AR.xaml | 1 + .../Resources/Localization/StringResources.fi.xaml | 3 ++- .../Resources/Localization/StringResources.fr.xaml | 3 ++- .../Resources/Localization/StringResources.he.xaml | 3 ++- .../Resources/Localization/StringResources.hu.xaml | 3 ++- .../Resources/Localization/StringResources.it.xaml | 3 ++- .../Resources/Localization/StringResources.ja.xaml | 3 ++- .../Resources/Localization/StringResources.ko.xaml | 3 ++- .../Resources/Localization/StringResources.nl.xaml | 1 + .../Resources/Localization/StringResources.pl.xaml | 3 ++- .../Localization/StringResources.pt-PT.xaml | 1 + .../Resources/Localization/StringResources.pt.xaml | 1 + .../Resources/Localization/StringResources.ru.xaml | 3 ++- .../Resources/Localization/StringResources.sv.xaml | 1 + .../Resources/Localization/StringResources.sw.xaml | 1 + .../Resources/Localization/StringResources.tr.xaml | 3 ++- .../Resources/Localization/StringResources.uk.xaml | 3 ++- .../Resources/Localization/StringResources.vi.xaml | 1 + .../Localization/StringResources.zh-Hant.xaml | 1 + .../Resources/Localization/StringResources.zh.xaml | 3 ++- ScreenToGif/Resources/Settings.xaml | 1 + ScreenToGif/Windows/Editor.xaml | 12 +++++++++--- 29 files changed, 56 insertions(+), 17 deletions(-) diff --git a/ScreenToGif.Util/Settings/UserSettings.cs b/ScreenToGif.Util/Settings/UserSettings.cs index 5876ace8..077397ff 100644 --- a/ScreenToGif.Util/Settings/UserSettings.cs +++ b/ScreenToGif.Util/Settings/UserSettings.cs @@ -2039,6 +2039,12 @@ public Color FreeTextFontColor set => SetValue(value); } + public Color FreeTextBackgroundColor + { + get => (Color)GetValue(); + set => SetValue(value); + } + public TextAlignment FreeTextTextAlignment { get => (TextAlignment)GetValue(); diff --git a/ScreenToGif/Resources/Localization/StringResources.ar.xaml b/ScreenToGif/Resources/Localization/StringResources.ar.xaml index 9e5c5b02..a3e39ca4 100644 --- a/ScreenToGif/Resources/Localization/StringResources.ar.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.ar.xaml @@ -1093,6 +1093,7 @@ الوزن: الحجم: اللون: + لون الخلفية: خط خارجي سمك: تخطيط diff --git a/ScreenToGif/Resources/Localization/StringResources.cs.xaml b/ScreenToGif/Resources/Localization/StringResources.cs.xaml index 82d700be..14e83839 100644 --- a/ScreenToGif/Resources/Localization/StringResources.cs.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.cs.xaml @@ -1093,6 +1093,7 @@ Tloušťka: Velikost: Barva: + Barva pozadí: Obrys Tloušťka: Uspořádání diff --git a/ScreenToGif/Resources/Localization/StringResources.da.xaml b/ScreenToGif/Resources/Localization/StringResources.da.xaml index 6fad2db0..04dbc522 100644 --- a/ScreenToGif/Resources/Localization/StringResources.da.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.da.xaml @@ -1317,6 +1317,7 @@ Vægt: Str: Farve: + Baggrundsfarve: Omkreds Tykkelse: Placering @@ -1884,4 +1885,4 @@ Overstreg Toplinie Grundlinie - + \ No newline at end of file diff --git a/ScreenToGif/Resources/Localization/StringResources.de.xaml b/ScreenToGif/Resources/Localization/StringResources.de.xaml index 69706635..21820860 100644 --- a/ScreenToGif/Resources/Localization/StringResources.de.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.de.xaml @@ -1325,6 +1325,7 @@ Breite: Größe: Farbe: + Hintergrundfarbe: Kontur Breite: Position @@ -1997,4 +1998,4 @@ Durchstreichen Überstreichen Grundlinie - + \ No newline at end of file diff --git a/ScreenToGif/Resources/Localization/StringResources.el.xaml b/ScreenToGif/Resources/Localization/StringResources.el.xaml index f0a4dbcf..f979a44f 100644 --- a/ScreenToGif/Resources/Localization/StringResources.el.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.el.xaml @@ -1165,6 +1165,7 @@ Βάρος γραμματοσειράς: Μέγεθος: Χρώμα + Χρώμα του φόντου: Περίγραμμα Πάχος: Διάταξη diff --git a/ScreenToGif/Resources/Localization/StringResources.en.xaml b/ScreenToGif/Resources/Localization/StringResources.en.xaml index 46fd9a81..d98421c3 100644 --- a/ScreenToGif/Resources/Localization/StringResources.en.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.en.xaml @@ -1325,6 +1325,7 @@ Weight: Size: Color: + Background Color: Outline Thickness: Layout diff --git a/ScreenToGif/Resources/Localization/StringResources.es-AR.xaml b/ScreenToGif/Resources/Localization/StringResources.es-AR.xaml index 6a6dbbc1..01fa337f 100644 --- a/ScreenToGif/Resources/Localization/StringResources.es-AR.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.es-AR.xaml @@ -1093,6 +1093,7 @@ Peso: Tamaño: Color: + Color de fondo: Contorno Grosor: Diseño diff --git a/ScreenToGif/Resources/Localization/StringResources.fi.xaml b/ScreenToGif/Resources/Localization/StringResources.fi.xaml index 8c3a81d4..9f62d5b0 100644 --- a/ScreenToGif/Resources/Localization/StringResources.fi.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.fi.xaml @@ -1,4 +1,4 @@ - @@ -1325,6 +1325,7 @@ Paino: Koko: Väri: + Taustaväri: Hahmotelma Paksuus: Asettelu diff --git a/ScreenToGif/Resources/Localization/StringResources.fr.xaml b/ScreenToGif/Resources/Localization/StringResources.fr.xaml index 69971827..6afafd9a 100644 --- a/ScreenToGif/Resources/Localization/StringResources.fr.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.fr.xaml @@ -1,4 +1,4 @@ - @@ -1325,6 +1325,7 @@ Bordure: Taille: Couleur: + Couleur de l'arrière plan: Contour Épaisseur: Disposition diff --git a/ScreenToGif/Resources/Localization/StringResources.he.xaml b/ScreenToGif/Resources/Localization/StringResources.he.xaml index 5e5ac00b..36d53742 100644 --- a/ScreenToGif/Resources/Localization/StringResources.he.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.he.xaml @@ -1,4 +1,4 @@ - @@ -1306,6 +1306,7 @@ משקל: גודל: צבע: + צבע רקע: מתאר עובי: פריסה diff --git a/ScreenToGif/Resources/Localization/StringResources.hu.xaml b/ScreenToGif/Resources/Localization/StringResources.hu.xaml index 69d58300..fa5913a0 100644 --- a/ScreenToGif/Resources/Localization/StringResources.hu.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.hu.xaml @@ -1,4 +1,4 @@ - @@ -1325,6 +1325,7 @@ Vastagság: Méret: Szín: + Háttérszín: Körvonal Vastagság: Elrendezés diff --git a/ScreenToGif/Resources/Localization/StringResources.it.xaml b/ScreenToGif/Resources/Localization/StringResources.it.xaml index 24a707a0..3a728dd6 100644 --- a/ScreenToGif/Resources/Localization/StringResources.it.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.it.xaml @@ -1,4 +1,4 @@ - @@ -1325,6 +1325,7 @@ Peso: Dimensione: Colore: + Colore di sfondo: Contorno Spessore: Disposizione diff --git a/ScreenToGif/Resources/Localization/StringResources.ja.xaml b/ScreenToGif/Resources/Localization/StringResources.ja.xaml index a42a1e09..09149dff 100644 --- a/ScreenToGif/Resources/Localization/StringResources.ja.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.ja.xaml @@ -1306,6 +1306,7 @@ 太さ: サイズ: 色: + 背景色: アウトライン 太さ(厚さ): レイアウト @@ -1862,4 +1863,4 @@ 取り消し線 オーバーライン ベースライン - + \ No newline at end of file diff --git a/ScreenToGif/Resources/Localization/StringResources.ko.xaml b/ScreenToGif/Resources/Localization/StringResources.ko.xaml index 26c77ef9..e76bedbd 100644 --- a/ScreenToGif/Resources/Localization/StringResources.ko.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.ko.xaml @@ -1151,6 +1151,7 @@ 굵기: 크기: 색상: + 배경색: 외곽선 두께: 위치 설정 @@ -1505,4 +1506,4 @@ 수평 수직 - + \ No newline at end of file diff --git a/ScreenToGif/Resources/Localization/StringResources.nl.xaml b/ScreenToGif/Resources/Localization/StringResources.nl.xaml index 59507662..e395c121 100644 --- a/ScreenToGif/Resources/Localization/StringResources.nl.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.nl.xaml @@ -1325,6 +1325,7 @@ Gewicht: Grootte: Kleur: + Achtergrond kleur: Contour Dikte: Opmaak diff --git a/ScreenToGif/Resources/Localization/StringResources.pl.xaml b/ScreenToGif/Resources/Localization/StringResources.pl.xaml index 188bb45c..cc52f2b9 100644 --- a/ScreenToGif/Resources/Localization/StringResources.pl.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.pl.xaml @@ -1,4 +1,4 @@ - @@ -1325,6 +1325,7 @@ Waga: Rozmiar: Kolor: + Kolor tła: Kontur Grubość: Układ diff --git a/ScreenToGif/Resources/Localization/StringResources.pt-PT.xaml b/ScreenToGif/Resources/Localization/StringResources.pt-PT.xaml index a2f813e9..16e340e5 100644 --- a/ScreenToGif/Resources/Localization/StringResources.pt-PT.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.pt-PT.xaml @@ -1325,6 +1325,7 @@ Peso: Tamanho: Cor: + Cor de fundo: Borda Espessura: Posicionamento diff --git a/ScreenToGif/Resources/Localization/StringResources.pt.xaml b/ScreenToGif/Resources/Localization/StringResources.pt.xaml index 76128a91..bd4d7dd3 100644 --- a/ScreenToGif/Resources/Localization/StringResources.pt.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.pt.xaml @@ -1325,6 +1325,7 @@ Peso: Tamanho: Cor: + Cor de fundo: Borda Espessura: Posicionamento diff --git a/ScreenToGif/Resources/Localization/StringResources.ru.xaml b/ScreenToGif/Resources/Localization/StringResources.ru.xaml index d3edf907..8095b582 100644 --- a/ScreenToGif/Resources/Localization/StringResources.ru.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.ru.xaml @@ -1325,6 +1325,7 @@ Начертание: Размер: Цвет: + Фоновый цвет: Обводка Толщина: Макет @@ -1997,4 +1998,4 @@ Зачеркнутый Линия сверху На линии - + \ No newline at end of file diff --git a/ScreenToGif/Resources/Localization/StringResources.sv.xaml b/ScreenToGif/Resources/Localization/StringResources.sv.xaml index f169714a..86324f75 100644 --- a/ScreenToGif/Resources/Localization/StringResources.sv.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.sv.xaml @@ -1093,6 +1093,7 @@ Vikt: Storlek: Färg: + Bakgrundsfärg: Översikt Tjocklek: Layout diff --git a/ScreenToGif/Resources/Localization/StringResources.sw.xaml b/ScreenToGif/Resources/Localization/StringResources.sw.xaml index 8f111054..5dd63d3a 100644 --- a/ScreenToGif/Resources/Localization/StringResources.sw.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.sw.xaml @@ -1093,6 +1093,7 @@ Uzani: Ukubwa: Rangi: + Rangi ya Mandharinyuma: Kiolezi Unene: Mpangilio diff --git a/ScreenToGif/Resources/Localization/StringResources.tr.xaml b/ScreenToGif/Resources/Localization/StringResources.tr.xaml index 29577dc4..2ebf736e 100644 --- a/ScreenToGif/Resources/Localization/StringResources.tr.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.tr.xaml @@ -1093,6 +1093,7 @@ Ağırlık: Boyut: Renk: + Arka plan rengi: Dış çizgi Kalınlık: Düzen @@ -1438,4 +1439,4 @@ Yatay Düşey - + \ No newline at end of file diff --git a/ScreenToGif/Resources/Localization/StringResources.uk.xaml b/ScreenToGif/Resources/Localization/StringResources.uk.xaml index 20dc87ed..63117a7d 100644 --- a/ScreenToGif/Resources/Localization/StringResources.uk.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.uk.xaml @@ -1,4 +1,4 @@ - @@ -1325,6 +1325,7 @@ Товщина: Розмір: Колір: + Колір фону: Контур Товщина: Розташування diff --git a/ScreenToGif/Resources/Localization/StringResources.vi.xaml b/ScreenToGif/Resources/Localization/StringResources.vi.xaml index 1e03a667..c39404cc 100644 --- a/ScreenToGif/Resources/Localization/StringResources.vi.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.vi.xaml @@ -1093,6 +1093,7 @@ Độ đậm nét: Cỡ chữ: Màu sắc: + Màu nền: Đường bao Chiều dày: Bố trí diff --git a/ScreenToGif/Resources/Localization/StringResources.zh-Hant.xaml b/ScreenToGif/Resources/Localization/StringResources.zh-Hant.xaml index c2ccf36d..ca65dff7 100644 --- a/ScreenToGif/Resources/Localization/StringResources.zh-Hant.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.zh-Hant.xaml @@ -1325,6 +1325,7 @@ 粗細: 大小: 顏色: + 背景顏色: 外框 粗細: 配置 diff --git a/ScreenToGif/Resources/Localization/StringResources.zh.xaml b/ScreenToGif/Resources/Localization/StringResources.zh.xaml index ed3c4baa..a20fed98 100644 --- a/ScreenToGif/Resources/Localization/StringResources.zh.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.zh.xaml @@ -1325,6 +1325,7 @@ 字重: 字号: 颜色: + 背景颜色: 轮廓 粗细: 布局 @@ -1997,4 +1998,4 @@ 删除线 上划线 底线 - + \ No newline at end of file diff --git a/ScreenToGif/Resources/Settings.xaml b/ScreenToGif/Resources/Settings.xaml index c475edd5..372970fe 100644 --- a/ScreenToGif/Resources/Settings.xaml +++ b/ScreenToGif/Resources/Settings.xaml @@ -291,6 +291,7 @@ Normal 16.0 #FF000000 + #00000000 Left None True diff --git a/ScreenToGif/Windows/Editor.xaml b/ScreenToGif/Windows/Editor.xaml index 6472c6b7..1deb1828 100644 --- a/ScreenToGif/Windows/Editor.xaml +++ b/ScreenToGif/Windows/Editor.xaml @@ -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}"> + @@ -2193,8 +2195,12 @@ - - + + + + From b3c5ab9e4f88e6b8eded984b775ffed46a9b6409 Mon Sep 17 00:00:00 2001 From: Nicke Manarin Date: Sat, 30 Sep 2023 20:52:21 -0300 Subject: [PATCH 2/5] Initial support for v6 of FFmpeg --- .../Enums/SupportedFFmpegVersions.cs | 8 +++ ScreenToGif.Util/Settings/UserSettings.cs | 6 ++ .../Localization/StringResources.en.xaml | 1 + .../Localization/StringResources.pt.xaml | 1 + ScreenToGif/Resources/Settings.xaml | 1 + ScreenToGif/Util/EncodingManager.cs | 66 ++++++++++++++----- ScreenToGif/Windows/Options.xaml | 12 +++- 7 files changed, 76 insertions(+), 19 deletions(-) create mode 100644 ScreenToGif.Model/Enums/SupportedFFmpegVersions.cs diff --git a/ScreenToGif.Model/Enums/SupportedFFmpegVersions.cs b/ScreenToGif.Model/Enums/SupportedFFmpegVersions.cs new file mode 100644 index 00000000..20b3ee70 --- /dev/null +++ b/ScreenToGif.Model/Enums/SupportedFFmpegVersions.cs @@ -0,0 +1,8 @@ +namespace ScreenToGif.Domain.Enums; + +public enum SupportedFFmpegVersions +{ + Version6 = 0, + Version5, + Version4, +} \ No newline at end of file diff --git a/ScreenToGif.Util/Settings/UserSettings.cs b/ScreenToGif.Util/Settings/UserSettings.cs index 077397ff..945c91d7 100644 --- a/ScreenToGif.Util/Settings/UserSettings.cs +++ b/ScreenToGif.Util/Settings/UserSettings.cs @@ -1544,6 +1544,12 @@ public string FfmpegLocation set => SetValue(value); } + public SupportedFFmpegVersions FfmpegVersion + { + get => (SupportedFFmpegVersions)GetValue(); + set => SetValue(value); + } + public string GifskiLocation { get => (string)GetValue(); diff --git a/ScreenToGif/Resources/Localization/StringResources.en.xaml b/ScreenToGif/Resources/Localization/StringResources.en.xaml index d98421c3..20966ef9 100644 --- a/ScreenToGif/Resources/Localization/StringResources.en.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.en.xaml @@ -581,6 +581,7 @@ Select the location of the FFmpeg executable FFmpeg executable The path of FFMpeg executable contains one or more invalid characters. Please, select a valid location for that executable. + FFmpeg Version Gifski location Select the location of the Gifski library Gifski library diff --git a/ScreenToGif/Resources/Localization/StringResources.pt.xaml b/ScreenToGif/Resources/Localization/StringResources.pt.xaml index bd4d7dd3..b7b35f67 100644 --- a/ScreenToGif/Resources/Localization/StringResources.pt.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.pt.xaml @@ -581,6 +581,7 @@ Selecione a pasta de localização do executável do FFmpeg. Executável do FFmpeg 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. + Versão do FFmpeg Localização do Gifski Selecione a localização da biblioteca Gifski Biblioteca Gifski diff --git a/ScreenToGif/Resources/Settings.xaml b/ScreenToGif/Resources/Settings.xaml index 372970fe..b0e900c7 100644 --- a/ScreenToGif/Resources/Settings.xaml +++ b/ScreenToGif/Resources/Settings.xaml @@ -193,6 +193,7 @@ + Version4 diff --git a/ScreenToGif/Util/EncodingManager.cs b/ScreenToGif/Util/EncodingManager.cs index 2630507e..aa71689b 100644 --- a/ScreenToGif/Util/EncodingManager.cs +++ b/ScreenToGif/Util/EncodingManager.cs @@ -46,6 +46,7 @@ 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 @@ private static void EncodeWithFfmpeg(ExportPreset preset, List