Poor Quality of EPS file

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
Carter J
Posts: 116
Joined: 2013-12-19T02:20:09-07:00
Authentication code: 6789

Poor Quality of EPS file

Post by Carter J »

Hi,

I am using followings commands for converting a TIFF file to EPS file:


convert -alpha off -strip tiffile.tif[0] -density 100 epsfile.eps

convert -alpha off -strip tiffile.tif[0] -resample 100 epsfile.eps

I have tried above commands but no command produced epsfile.eps file with resolution 100X100. The above commands produced a result with 72X72 resolution. And the produced eps file is like an x-ray image.

Note: When I am applying profile to this file, then EPS file is produced with good quality. But I want this EPS file generation without applying any profile
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Poor Quality of EPS file

Post by fmw42 »

You are putting a raster file into an eps vector shell. EPS is normally a vector format. But with a raster file imbedded it will be the same as the raster file. When displaying the eps file you will need to define a new density in order for it, since it has no implicit density or resize the tif file first before converting it.

This works for me

convert rose: rose.eps

Now compare

display rose:

to

display -density 400 rose:

The latter is larger.
Carter J
Posts: 116
Joined: 2013-12-19T02:20:09-07:00
Authentication code: 6789

Re: Poor Quality of EPS file

Post by Carter J »

Hi,

For converting a TIFF file to EPS file I have used the following command:
convert -alpha off -strip -resample 150 TEST_0201_2.tif[0] -profile /tmp/ICCProfiles/Recommended/USWebCoatedSWOP.icc -profile "/tmp/ICCProfiles/Recommended/sRGB Color Space Profile.icm" /tmp/TestFiles/tif_test_tif_resample_temp_1.eps

When I used this command to generate a EPS file, I was able to find two files in the destination folder having "-0" or "-1"(tif_test_tif_resample_temp_1-0.eps & tif_test_tif_resample_temp_1-1.eps). And one of the file is a blank white screen and other is the xray image of the Tiff file.

When I used the below command I am able to produce only one file as output, but the output EPS file looks like a x-ray image:
convert -alpha off -strip -resample 150 -background White TEST_0201_1.tif -profile /tmp/ICCProfiles/Recommended/USWebCoatedSWOP.icc -profile "/tmp/ICCProfiles/Recommended/sRGB Color Space Profile.icm" -flatten /e2/tiftoepsconverter.eps

I have taken the screen shot of the EPS generated. Please find the screenshot in the below link:
https://www.dropbox.com/s/ot9qdxuzvlxa73r/X-rayImg.jpg

Thanks in advance...............
Last edited by Carter J on 2014-02-12T00:01:44-07:00, edited 2 times in total.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Poor Quality of EPS file

Post by snibgo »

convert -alpha off -strip -resample 150 TEST_0201_2.tif[0] /tmp/ICCProfiles/Recommended/USWebCoatedSWOP.icc -profile "/tmp/ICCProfiles/Recommended/sRGB Color Space Profile.icm" /tmp/TestFiles/tif_test_tif_resample_temp_1.eps
The command is badly formed.

You should read the input, process it, then write it.

You put /tmp/ICCProfiles/Recommended/USWebCoatedSWOP.icc in the place where IM expects an input image. So it reads it as an image, which is why it writes two output images.

A better command would be:

Code: Select all

convert ^
  TEST_0201_2.tif[0] ^
  -alpha off -strip -resample 150 ^
  -profile /tmp/ICCProfiles/Recommended/USWebCoatedSWOP.icc ^
  -profile "/tmp/ICCProfiles/Recommended/sRGB Color Space Profile.icm" ^
  /tmp/TestFiles/tif_test_tif_resample_temp_1.eps
(Windows syntax, so line-continuation character is "^").

Can you put your input tiff somewhere like dropbox.com and post the URL here?
snibgo's IM pages: im.snibgo.com
Carter J
Posts: 116
Joined: 2013-12-19T02:20:09-07:00
Authentication code: 6789

Re: Poor Quality of EPS file

Post by Carter J »

Thanks snibgo, I have run wrong command. Now I have updated the command.

convert -alpha off -strip -resample 150 TEST_0201_2.tif[0] -profile /tmp/ICCProfiles/Recommended/USWebCoatedSWOP.icc -profile "/tmp/ICCProfiles/Recommended/sRGB Color Space Profile.icm" /tmp/TestFiles/tif_test_tif_resample_temp_1.eps

Its working on machine having ImageMagick - 6.8.7-5 and not working on machine having ImageMagick - 6.5.4-7

Is there any solution for making it to work with ImageMagick - 6.5.4-7
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Poor Quality of EPS file

Post by snibgo »

v6.5.4 is very old. Perhaps "-profile" worked differently then. I suppose the input tiff is CMY or CMYK, and perhaps "-colorspace" will help.

Can you put your input tiff somewhere like dropbox.com and post the URL here?
snibgo's IM pages: im.snibgo.com
Carter J
Posts: 116
Joined: 2013-12-19T02:20:09-07:00
Authentication code: 6789

Re: Poor Quality of EPS file

Post by Carter J »

As these files are customer specific files. I could not give those files to you........
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Poor Quality of EPS file

Post by fmw42 »

convert -alpha off -strip -resample 150 TEST_0201_2.tif[0] -profile /tmp/ICCProfiles/Recommended/USWebCoatedSWOP.icc -profile "/tmp/ICCProfiles/Recommended/sRGB Color Space Profile.icm" /tmp/TestFiles/tif_test_tif_resample_temp_1.eps
I think this command is still wrong. You should read the tif file first, then turn alpha off and resample after converting with profiles. Try

convert TEST_0201_2.tif[0] -alpha off -strip -profile /tmp/ICCProfiles/Recommended/USWebCoatedSWOP.icc -profile "/tmp/ICCProfiles/Recommended/sRGB Color Space Profile.icm" -resample 150 /tmp/TestFiles/tif_test_tif_resample_temp_1.eps
Post Reply