This project has moved. For the latest updates, please go here.

Confusion when resizing .eps file

Oct 23, 2014 at 6:25 PM
I have this file located here:

https://www.dropbox.com/s/4aa0pkptw1yfpsz/cartoon_network_logo_r.eps?dl=0

What I am trying to do is take an .eps, convert it to .png and resize it where the width =3000. It does it, but the resulting image is fuzzy. Thoughts as to what I am doing wrong?
        var destinationStream = new FileStream(@"C:\test.png", FileMode.Create);

        //this is the image in dropbox
        string sourceFilePath = sourceFile;

        MagickImage magickImage1 = new MagickImage(sourceFilePath);

        magickImage1.Strip();
        magickImage1.Resize(3000, 0);
        magickImage1.Format = MagickFormat.Png;
        magickImage1.Density = new MagickGeometry(300, 300);

        destinationStream.SetLength(0);

        magickImage1.Write(destinationStream);
Thanks
Coordinator
Oct 23, 2014 at 10:09 PM
The image dimensions after reading the file are 297x80. If you resize 297 to 3000 it will look fuzzy. You might need to read the image at a higher density.
Oct 24, 2014 at 12:55 PM
Ok. Thanks. But when I use the following:
       settings.Density = new MagickGeometry(3000,0);

       MagickImage magickImage1 = new MagickImage(sourceFilePath, settings);
the size turns out to be 12359 x 3346. I can then resize it back down and it looks fine. Is the trick to simply read it at a higher density and then resize it back down to what I want(3000 x 812). Or is there a way to read the file where the actual size is what I want so I don't have to resize it?
Coordinator
Oct 24, 2014 at 9:25 PM
At this moment you cannot do that but with the next release of Magick.NET (7.0.0.0006) you will be able to do the following:
MagickImage magickImage1 = new MagickImage();
magickImage1.SetDefine(MagickFormat.Eps, "fit-page", "3000x3000"); // Fit inside 3000x3000 square
magickImage1.Read(sourceFilePath);
This will return an image that fits inside a 3000x3000 square. This will make your cartoon network logo 3000x808.