You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace ImageMagick with ImageSharp for image processing
Refactored the codebase to use SixLabors.ImageSharp instead of ImageMagick for all image processing tasks, including watermarking and GIF frame counting. Removed all OpenCL-related code and updated documentation, comments, and developer notes to reflect the new dependency. Updated global usings and ensured watermark resizing is handled per image to avoid shared state.
Copy file name to clipboardExpand all lines: Add Identity To Content/Program.cs
+7-5Lines changed: 7 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,12 @@
4
4
globalusingSystem.Threading.Tasks;
5
5
globalusingSystem.Linq;
6
6
globalusingSystem.Diagnostics;
7
-
//Xabe.FFmpeg and ImageMagick are not included in the .NET SDK, you need to install them using NuGet.
7
+
//Xabe.FFmpeg and SixLabors.ImageSharp are not included in the .NET SDK, you need to install them using NuGet.
8
8
// The using directive for Xabe.FFmpeg does not highlight in Visual Studio, but it is still recognized.
9
9
globalusingXabe.FFmpeg;
10
-
globalusingImageMagick;
10
+
globalusingSixLabors.ImageSharp;
11
+
globalusingSixLabors.ImageSharp.Processing;
12
+
globalusingSixLabors.ImageSharp.PixelFormats;
11
13
globalusingSystem.Text.RegularExpressions;
12
14
13
15
// Developer Notes:
@@ -18,9 +20,9 @@
18
20
// Sometimes you may have to manually terminate ffmpeg processes in Task Manager.
19
21
// sometimes the gif conversion may only output the converted video,
20
22
// you will have to add them back through the process again to add the watermark.
21
-
// You need to download ImageMagick and FFmpeg to run this program.
23
+
// You need to download FFmpeg to run this program.
22
24
// You need to have the watermark.png file in the same directory as the source files.
23
-
// The FFmpeg and ImageMagick paths must be placed in the same directory as the executable once it is built, GitHub does not allow uploading these files.
25
+
// The FFmpeg path must be placed in the same directory as the executable once it is built, GitHub does not allow uploading these files.
24
26
// The program will log errors to error.log and unsupported files to unsupported_files.log.
25
27
// Note: this project was built with the assistance of GitHub Copilot X Chat AI.
0 commit comments