TIFF to EPS resulting in bad output image

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
HaroldWindt
Posts: 11
Joined: 2015-06-02T05:04:29-07:00
Authentication code: 6789

TIFF to EPS resulting in bad output image

Post by HaroldWindt »

When converting the TIFF-CMYK file to EPS-RGB all the flats (knocked out images with a shadow on a transparent layer, saved as a transparent tiff) are showing up with very dark shadow in the output EPS

One of the source TIFF file - https://www.dropbox.com/s/dvah41j76zxzk ... 1.tif?dl=0

Command used for conversion
convert -alpha off -units pixelsperinch -resample 120 Harold_1.tif[0] -profile USWebCoatedSWOP.icc -profile "/sRGB Color Space Profile.icm" Harold_1.eps

Can some one help me to understand what's causing the issue.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: TIFF to EPS resulting in bad output image

Post by snibgo »

It seems to work for me, writing to a png file.

There is Photoshop metadata, which IM won't change but Adobe tools may read when showing the result. You might "-strip" before writing the result.

The input contains an embedded profile. I can't see any need to convert via USWebCoatedSWOP.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: TIFF to EPS resulting in bad output image

Post by fmw42 »

It looks reasonable to me as PNG, though has a light gray shadow, but as EPS, it show the black shadow. IM 6.9.2.5 Q16 Mac OSX. Perhaps an issue with the delegate.xml file for processing the output eps?

Code: Select all

convert -quiet -units pixelsperinch Harold_1.tif[0] -strip \
-profile /Users/fred/images/profiles/USWebCoatedSWOP.icc \
-profile /Users/fred/images/profiles/sRGB.icc \
-resample 120 Harold_1.png

Code: Select all

convert -quiet -units pixelsperinch Harold_1.tif[0] -strip \
-profile /Users/fred/images/profiles/USWebCoatedSWOP.icc \
-profile /Users/fred/images/profiles/sRGB.icc \
-resample 120 Harold_1.eps
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: TIFF to EPS resulting in bad output image

Post by snibgo »

I think stripping before doing the colour conversion is unwise because the embedded "Iridio325" profile will be ignored. Stripping after the colour conversion, when the image is in sRGB space, seems more wise.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: TIFF to EPS resulting in bad output image

Post by fmw42 »

Whether or where I add -strip does not seem to matter. I still get this black shadow for eps output and not for png output

Code: Select all

convert -quiet -units pixelsperinch Harold_1.tif[0] \
-profile /Users/fred/images/profiles/USWebCoatedSWOP.icc \
-profile /Users/fred/images/profiles/sRGB.icc \
-strip -resample 120 Harold_1.eps
There is a black alpha channel in the TIFF file along with lots of other black alpha (mask) channels. I do not know if this is causing the problem or not.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: TIFF to EPS resulting in bad output image

Post by fmw42 »

I get the same result by converting to PNG as above and then converting that PNG directly to EPS. The PNG has a light shadow and the EPS has a black shadow. So it would appear to be in the EPS writer and how it deals with transparency. Perhaps it only allows binary transparency? Or perhaps the black is coming from the black alpha mask channel and is being offset?

It is also strange that we are using layer [0] only and that should have transparency off due to -alpha off. The shadow one sees in the PNG output appears to be coming from layer [1], which should not have been used?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: TIFF to EPS resulting in bad output image

Post by fmw42 »

This seems to work by using the clip-path in the image.

Code: Select all

convert -quiet Harold_1.tif[0] \
-profile /Users/fred/images/profiles/USWebCoatedSWOP.icc \
-profile /Users/fred/images/profiles/sRGB.icc \
-alpha transparent -clip -alpha opaque -strip Harold_1.eps
HaroldWindt
Posts: 11
Joined: 2015-06-02T05:04:29-07:00
Authentication code: 6789

Re: TIFF to EPS resulting in bad output image

Post by HaroldWindt »

fmw42 wrote:This seems to work by using the clip-path in the image.

Code: Select all

convert -quiet Harold_1.tif[0] \
-profile /Users/fred/images/profiles/USWebCoatedSWOP.icc \
-profile /Users/fred/images/profiles/sRGB.icc \
-alpha transparent -clip -alpha opaque -strip Harold_1.eps
This is chopping off the complete shadow (border), nothing is visible
Earlier it was black
----------------------------------
ImageMagick 6.9.1-0
GS version 9.15
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: TIFF to EPS resulting in bad output image

Post by fmw42 »

Since you had specified -alpha off in your original command, I thought you did not want any shadow.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: TIFF to EPS resulting in bad output image

Post by fmw42 »

try this

Code: Select all

convert -quiet Harold_1.tif[0] \
-profile /Users/fred/images/profiles/USWebCoatedSWOP.icc \
-profile /Users/fred/images/profiles/sRGB.icc \
-strip -background white -flatten Harold_1.eps
Post Reply