Use Magick instead of ImageSharp

Support more formats and output in original format
(3/10)
This commit is contained in:
Chenx221 2024-09-10 17:37:17 +08:00
parent a3e953b4e7
commit b1a7268288
3 changed files with 5 additions and 2 deletions

View File

@ -8,7 +8,7 @@ namespace Comic_Compressor
internal static void CompressImages(string sourceImagePath, string targetStoragePath, int threadCount, int format) internal static void CompressImages(string sourceImagePath, string targetStoragePath, int threadCount, int format)
{ {
//check format //check format
//throw new NotImplementedException(); throw new NotImplementedException();
//config //config
MagickFormat targetFormat = MagickFormat.Jxl; MagickFormat targetFormat = MagickFormat.Jxl;
string targetExtension = ".jxl"; string targetExtension = ".jxl";

View File

@ -7,6 +7,7 @@ namespace Comic_Compressor
internal static void CompressImages(string sourceImagePath, string targetStoragePath, int threadCount, int format) internal static void CompressImages(string sourceImagePath, string targetStoragePath, int threadCount, int format)
{ {
//detect mu-config //detect mu-config
throw new NotImplementedException();
//config //config
MagickFormat targetFormat = MagickFormat.Jxl; MagickFormat targetFormat = MagickFormat.Jxl;
string targetExtension = ".jxl"; string targetExtension = ".jxl";

View File

@ -1,4 +1,5 @@
using System.Text; using ImageMagick;
using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
namespace Comic_Compressor namespace Comic_Compressor
{ {
@ -7,6 +8,7 @@ namespace Comic_Compressor
[STAThread] [STAThread]
static void Main() static void Main()
{ {
//OpenCL.IsEnabled = true;
Console.OutputEncoding = Encoding.UTF8; Console.OutputEncoding = Encoding.UTF8;
Console.WriteLine("请选择源图像所在位置:"); Console.WriteLine("请选择源图像所在位置:");