Hi,
I'm using IM on a Mac, version Version: ImageMagick 6.9.2-5 Q16 x86_64 2015-11-01
Converting EPS to GIF. Using this code
convert -density 300 -strip -background white -flatten -resize 600 -colors 128 -depth 8 /Users/Nirav/Desktop/assets/RT-Compliance-S.eps /Users/Nirav/Desktop/assets/converted.gif
The resulting GIF file show colors mixing (ie. blue line on yellow background yields GREEN line)
Original here http://we.tl/pZMcRHuF8T
converted GIF here https://app.box.com/s/7bocv5sg0eopnuc02wvy9e1kgw86px0y
Thanks for your help
EPS to GIF conversion
-
- Posts: 6
- Joined: 2015-11-06T17:13:33-07:00
- Authentication code: 1151
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: EPS to GIF conversion
Your EPS is CMYK. Before you resize and change colors, you need to convert to sRGB.The resulting GIF file show colors mixing (ie. blue line on yellow background yields GREEN line)
try
Code: Select all
convert -strip -colorspace sRGB -density 300 -background white -flatten -resize 600 -colors 128 -depth 8 /Users/Nirav/Desktop/assets/RT-Compliance-S.eps /Users/Nirav/Desktop/assets/converted.gif
-
- Posts: 6
- Joined: 2015-11-06T17:13:33-07:00
- Authentication code: 1151
Re: EPS to GIF conversion
You the MAN Fred, THANK YOU!
-
- Posts: 6
- Joined: 2015-11-06T17:13:33-07:00
- Authentication code: 1151
Re: EPS to GIF conversion
Fred,
The code works great on my local version (Mac IM version 6.9.2) but not so well on my developers version 6.9.0 When he adds in -colorspace sRGB the quality gets really poor. The screen shot here http://we.tl/CV5q3qb0DI shows the code and the resulting image below it. The image on the left includes -colorspace sRGB, the right does not. Any ideas
The code works great on my local version (Mac IM version 6.9.2) but not so well on my developers version 6.9.0 When he adds in -colorspace sRGB the quality gets really poor. The screen shot here http://we.tl/CV5q3qb0DI shows the code and the resulting image below it. The image on the left includes -colorspace sRGB, the right does not. Any ideas
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: EPS to GIF conversion
As I mentioned above, you must convert from CMYK to sRGB before doing any resizing or color changes such as -colors. IM expects sRGB for processing colors (in general).
If they two systems produce different results when they both have -colorspace sRGB, then note there were some problems in early versions of 6.9.0 (esp 6.9.0.1). Check your IM version from
Also check to see that you have the same versions of Ghostscript. There have been reported problems with some versions of GS around 9.16. So be sure you are using either the latest version on both systems or match the version you are using on the system that works.
My guess is that you have different versions of Ghostscript on the two systems.
If Ghostscript versions are the same, then use profiles rather than -colorspace sRGB to convert from CMYK to sRGB. But you have to put the -profile commands after reading the EPS file rather than using -colorspace sRGB before reading the EPS file. If the EPS file has an internal profile such as USWebCoatedSwop.icc, then you only need one -profile command for sRGB.icc. If the EPS is just CMYK with no profile, then you need two -profile commands, the first to set the profile to USWebCoatedSwop.icc and the second to change it to sRGB.
To improve quality, you can always use supersampling. Set the density higher and then resize to cut the image size down again.
For example if you use density=288 (72x4) where 72 is nominal. Then you would have to resize by 25% to get back the same size. If that is not sharp enough then do 72*8 or 72*16 and resize by 1/8 or 1/16.
I am not sure why you picked your input density of 300 and and your resize to the size you used. But if you want the same output size, then keep the -resize as you have it, but increase the density from 300.
If they two systems produce different results when they both have -colorspace sRGB, then note there were some problems in early versions of 6.9.0 (esp 6.9.0.1). Check your IM version from
Code: Select all
convert -version
Also check to see that you have the same versions of Ghostscript. There have been reported problems with some versions of GS around 9.16. So be sure you are using either the latest version on both systems or match the version you are using on the system that works.
Code: Select all
gs --version
If Ghostscript versions are the same, then use profiles rather than -colorspace sRGB to convert from CMYK to sRGB. But you have to put the -profile commands after reading the EPS file rather than using -colorspace sRGB before reading the EPS file. If the EPS file has an internal profile such as USWebCoatedSwop.icc, then you only need one -profile command for sRGB.icc. If the EPS is just CMYK with no profile, then you need two -profile commands, the first to set the profile to USWebCoatedSwop.icc and the second to change it to sRGB.
To improve quality, you can always use supersampling. Set the density higher and then resize to cut the image size down again.
For example if you use density=288 (72x4) where 72 is nominal. Then you would have to resize by 25% to get back the same size. If that is not sharp enough then do 72*8 or 72*16 and resize by 1/8 or 1/16.
I am not sure why you picked your input density of 300 and and your resize to the size you used. But if you want the same output size, then keep the -resize as you have it, but increase the density from 300.