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

Converting EPS to TIF and preserve Transparency

Oct 23, 2014 at 2:21 PM
I'm trying to convert an EPS file to TIF. I need to preserve transparency and CMYK coloring. I am able to do this fine if I use RGB coloring and PNG as a format, but not when I switch to CMYK, or CMYK + TIF.

Here is my code:
string fileNames = "~/../../../files/input/";
                string DestFilesPath = "~/../../../files/output/";
                Console.WriteLine("Conversion started----");

                foreach (string filePath in Directory.GetFiles(fileNames, "*", SearchOption.AllDirectories))
                    MagickReadSettings settings = new MagickReadSettings();
                    settings.ColorSpace = ColorSpace.CMYK;
                    settings.Density = new MagickGeometry(72, 72);

                    string EPSfile = filePath.Substring(filePath.LastIndexOf("/") + 1);
                    string file = EPSfile.Remove(EPSfile.LastIndexOf("."));


                    using (MagickImage image = new MagickImage("~/../../files/input/" + EPSfile, settings))
                        image.Format = MagickFormat.Tif;
                        byte[] bytes = image.ToByteArray();
                        using (FileStream fs = File.OpenWrite(DestFilesPath + file + ".tif"))
                            fs.Write(bytes, 0, bytes.Length);
                        //image.Write(DestFilesPath + file + ".tif");
                Console.WriteLine("Files are converted successfully");
The conversion works, but the background remains solid white when I want it to be transparent.

Here is an example file to test with.
Oct 23, 2014 at 10:04 PM
Magick.NET / ImageMagick does not support reading CMYKA EPS files. I will try to see if it is possible to add support for this later this year.
Oct 27, 2014 at 3:34 PM
Thanks for taking the time to respond.