EPS 到 JPEG,质量差的结果
EPS to JPEG, poor quality result
我正在使用 Magick.NET 使用以下代码将 EPS 文件导出为 JPEG:
MagickReadSettings settings = new MagickReadSettings();
settings.ColorSpace = ColorSpace.sRGB;
settings.Format = MagickFormat.Eps;
using (MagickImage _image = new MagickImage())
{
_image.Read(image.Path, settings); //Loading the EPS
_image.Resize(3000, 3000); //The max size will be 3000px
_image.Density = new Density(300); //Setting DPI = 300
_image.Write("teste.jpg"); //Saving the EPS
}
结果很差,我不知道为什么。使用前有什么要配置的_image.Write
?
通过 Photoshop 导出和 Magick.NET 导出查看结果:
Photoshop(2167x2322 300dpi):
Magick.NET(2800x3000 300dpi):
EPS文件的
为了获得高质量,需要在通过 MagickReadSettings
加载之前设置文件配置。
MagickReadSettings settings = new MagickReadSettings();
settings.ColorSpace = ColorSpace.sRGB;
settings.Format = MagickFormat.Eps;
settings.Compression = Compression.LosslessJPEG;
settings.Density = new Density(300);
using (MagickImage _image = new MagickImage())
{
_image.Read(image.Path, settings);
_image.Write("teste.jpg");
}
新结果:
我正在使用 Magick.NET 使用以下代码将 EPS 文件导出为 JPEG:
MagickReadSettings settings = new MagickReadSettings();
settings.ColorSpace = ColorSpace.sRGB;
settings.Format = MagickFormat.Eps;
using (MagickImage _image = new MagickImage())
{
_image.Read(image.Path, settings); //Loading the EPS
_image.Resize(3000, 3000); //The max size will be 3000px
_image.Density = new Density(300); //Setting DPI = 300
_image.Write("teste.jpg"); //Saving the EPS
}
结果很差,我不知道为什么。使用前有什么要配置的_image.Write
?
通过 Photoshop 导出和 Magick.NET 导出查看结果:
Photoshop(2167x2322 300dpi):
Magick.NET(2800x3000 300dpi):
为了获得高质量,需要在通过 MagickReadSettings
加载之前设置文件配置。
MagickReadSettings settings = new MagickReadSettings();
settings.ColorSpace = ColorSpace.sRGB;
settings.Format = MagickFormat.Eps;
settings.Compression = Compression.LosslessJPEG;
settings.Density = new Density(300);
using (MagickImage _image = new MagickImage())
{
_image.Read(image.Path, settings);
_image.Write("teste.jpg");
}
新结果: