Reputation: 177
I'm using Magick.NET to export EPS file to JPEG using the following code:
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
}
The result is so poor and I dont know why. There are someting to configure before use _image.Write
?
See the result by Photoshop exportation and Magick.NET exportation:
Photoshop(2167x2322 300dpi):
Magick.NET(2800x3000 300dpi):
Link of the EPS file: https://ufile.io/hhokl
Upvotes: 1
Views: 1069
Reputation: 177
To have a great quality it's necessary to set the file configuration before load it through 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");
}
Upvotes: 2