Colors/size when converting JPG to EPS

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Malmodir
Posts: 4
Joined: 2014-01-16T02:05:34-07:00
Authentication code: 6789

Colors/size when converting JPG to EPS

Post by Malmodir »

Hi,

I'm new here and really no expert concerning imaging. I have issues converting a JPG to EPS on Windows using
  • a fresh IM-6.8.8-2 installation
  • GhostScript 9.10
  • IrfanView 4.36
There are some settings the user of my GUI can choose for his media conversion like maintaining or selecting the desired image size, color space and/or color depth and it's working for all formats except EPS. And I somehow can't reproduce the following behavior using other CMYK JPG files.

The original:
Identify: _1.jpg JPEG 305x1091 305x1091+0+0 8-bit CMYK 1.922MB 0.016u 0:00.017
https://www.dropbox.com/s/58risypec0goh5h/_1.jpg


Maintain Colorspace

Code: Select all

convert _1.jpg t1.eps
Identify: t1.eps PS 73x262 73x262+0+0 8-bit sRGB 15.8KB 0.000u 0:00.000
The image has a red tint. It works if I open the original and resave it first using Paint or IrfanView.
https://www.dropbox.com/s/o35eyq41g5p3seh/t1.eps

Code: Select all

convert _1.jpg -density 72 t2.eps3
Identify: t2.eps3 PS 305x1091 305x1091+0+0 8-bit ColorSeparation CMYK 1.331MB 0.000u 0:00.001
Renamed it to .eps and it worked out. Colors are fine here. Does this have any side-effects?
https://www.dropbox.com/s/5c8hw3ebik11jzo/t2.eps


Force sRGB

Code: Select all

convert _1.jpg -density 72 -profile "profiles/sRGB Color Space Profile.ICM" cmyk2rgb.eps
Identify: cmyk2rgb.eps PS 305x1091 305x1091+0+0 8-bit sRGB 225KB 0.000u 0:00.000
Colors are fine. I have to provide a density to retain the size, even though I recall EPS not using density. Read in another thread that "-density 72" argument could work and it does, although I recall EPS not using density. IrfanView shows the size as 407x1455.
https://www.dropbox.com/s/7yt5znoykrcsdw6/cmyk2rgb.eps


Force CMYK

Code: Select all

convert _1.jpg -density 72 -profile "profiles/USWebCoatedSWOP.icc" cmyk2cmyk.eps
Identify: cmyk2cmyk.eps PS 305x1091 305x1091+0+0 8-bit sRGB 230KB 0.000u 0:00.000
Again the colors are tinted red'ishly.
https://www.dropbox.com/s/isf73zis07jut4j/cmyk2cmyk.eps

Code: Select all

convert _1.jpg -density 72 -profile "profiles/USWebCoatedSWOP.icc" cmyk2cmyk2.eps3
Identify: cmyk2cmyk2.eps3 PS 305x1091 305x1091+0+0 8-bit ColorSeparation CMYK 1.331MB 0.000u 0:00.002
Also read this in another thread. Renamed it to *.eps.
https://www.dropbox.com/s/6wshzbjyoh726 ... 2cmyk2.eps


Thank you for your attention. :)
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Colors/size when converting JPG to EPS

Post by fmw42 »

Your jpg has a cmyk profile. The straight conversion to eps, loses the profile and so sees the raw data as red. Many viewers also may not display cmyk images properly. The best thing when creating a new image is to use profiles to convert to sRGB.

This works fine for me.

convert _1.jpg -profile /Users/fred/images/Profiles/sRGB.icc _1b.eps

see
http://www.imagemagick.org/Usage/formats/#profiles
Malmodir
Posts: 4
Joined: 2014-01-16T02:05:34-07:00
Authentication code: 6789

Re: Colors/size when converting JPG to EPS

Post by Malmodir »

Thank you for your comment.

When targetting EPS, I now set the ColorProfile explicitly (even if no change is desired from the user's perspective) and fix the density to 72x72.

It seems like you're right. IrfanView couldn't open any EPS on a network share, copying it to a local drive worked fine. Awesome, I spent 3 hours on this yesterday until I decided to try EPSViewer, which then had a light green tint. Well, copying it to a local drive and opening the image with IrfanView gave me perfect results.
Post Reply