Page 1 of 2
Convert EPS with Mac Preview to PNG
Posted: 2011-11-17T10:10:05-07:00
by sma71
I am trying to figure out how I can take an EPS created in Photoshop and saved with a Mac preview and convert to PNG.
This is the error I get when running "convert previewMac.eps previewMac.png"
convert: Postscript delegate failed `previewMAC.eps': No such file or directory @ error/ps.c/ReadPSImage/807.
convert: missing an image filename `previewMAC.jpg' @ error/convert.c/ConvertImageCommand/3016.
If I run it with the same image saved with a TIFF preview it works fine.
I am running version 6.7.3-2 on OSX Lion
Re: Convert EPS with Mac Preview to PNG
Posted: 2011-11-17T10:36:10-07:00
by fmw42
I am not an expert on eps files. But what do you mean by created in Photoshop and saved with Preview. Are you saying you reopened the file in Preview and saved it again? Why? Was the Photoshop file not eps?
In general, you should probably post a link to your image so others could test.
The funny thing is you are getting a jpeg error and you are not using jpg for either your input or output. Did you imbed a jpeg into your Photoshop file?
Check your delegate libraries to see that you have ghostscript and png and jpg defined.
convert -list configure
then look at the line starting with DELEGATES and see if it contains gs, png, jpg, tiff
Re: Convert EPS with Mac Preview to PNG
Posted: 2011-12-02T12:56:01-07:00
by sma71
HI have reinstalled ghostscript and imagemagick and error has gone away when converting EPS to PNG, but I cannot figure out how to get a transparent background with this type of file that will be supplied to me.
Sample file located here:
http://www.mediafire.com/file/o53yp2lt7 ... o_1bit.eps
Re: Convert EPS with Mac Preview to PNG
Posted: 2011-12-02T14:35:51-07:00
by fmw42
I am not sure why these do not work (IM 6.7.3.10 Q16 Mac OSX Snow Leopard) with or without the -type palettematte
convert 1SampleLogo_1bit.eps -transparent white -type palettematte PNG8:1SampleLogo_1bit.png
convert 1SampleLogo_1bit.eps -transparent white -type palettematte PNG32:1SampleLogo_1bit.png
However these work.
convert 1SampleLogo_1bit.eps png:- | convert - -transparent white PNG32:1SampleLogo_1bit.png
convert 1SampleLogo_1bit.eps png:- | convert - -transparent white PNG8:1SampleLogo_1bit.png
Re: Convert EPS with Mac Preview to PNG
Posted: 2011-12-05T14:05:54-07:00
by sma71
Can you explain what is happening with the versions that seem to be working? I am not following the syntax with those.
Thanks!
Re: Convert EPS with Mac Preview to PNG
Posted: 2011-12-05T14:39:41-07:00
by fmw42
sma71 wrote:Can you explain what is happening with the versions that seem to be working? I am not following the syntax with those.
Thanks!
Code: Select all
convert 1SampleLogo_1bit.eps png:- | convert - -transparent white PNG32:1SampleLogo_1bit.png
convert 1SampleLogo_1bit.eps png:- | convert - -transparent white PNG8:1SampleLogo_1bit.png
I cannot really explain why these are working and the more direct ones do not.
What I am doing here is writing a temporary png file to standard out. Then piping it to another convert as standard in and processing from png to png format rather than directly from eps to png. So I am converting from eps to png, then making the png transparent and saving that as png again.
Re: Convert EPS with Mac Preview to PNG
Posted: 2011-12-05T14:50:45-07:00
by sma71
Yeah, that is strange that it will convert from the PNG as temp, but not as a straight convert. I guess I can use this for now, thanks for your insight into getting this working.
Re: Convert EPS with Mac Preview to PNG
Posted: 2011-12-05T14:52:24-07:00
by fmw42
sma71 wrote:Yeah, that is strange that it will convert from the PNG as temp, but not as a straight convert. I guess I can use this for now, thanks for your insight into getting this working.
I have sent PM to the PNG developer, but so far he has not opened my messages to look at this issue.
Re: Convert EPS with Mac Preview to PNG
Posted: 2011-12-05T15:17:19-07:00
by sma71
great, thanks. Please post any new developments in this area if you get a response.
Re: Convert EPS with Mac Preview to PNG
Posted: 2011-12-05T15:33:35-07:00
by fmw42
sma71 wrote:great, thanks. Please post any new developments in this area if you get a response.
He will most likely post here himself when he gets the messages with whatever he can contribute about this.
Re: Convert EPS with Mac Preview to PNG
Posted: 2011-12-05T16:24:15-07:00
by fmw42
One other thought. Perhaps the delegate library device (ghostscript?) is not handling eps conversion to transparency. But once you get a normal png that will convert properly with the -transparent command.
Re: Convert EPS with Mac Preview to PNG
Posted: 2011-12-05T16:27:52-07:00
by glennrp
Sorry, I don't notice PMs. Now I see that there is a tiny notification
- User Control Panel (0 new messages
so I'll try to remember
to watch for that in fhe future.
Re: Convert EPS with Mac Preview to PNG
Posted: 2011-12-05T16:46:41-07:00
by glennrp
What's happening is that the EPS image is in the CMYK colorspace.
Therefore the "-transparent white" directive doesn't work.
As you noted, converting to PNG first and then applying "transparent white"
works. That's because the PNG is written in the RGB colorspace.
These also work:
Code: Select all
convert SampleLogo_1bit.EPS -colorspace RGB -transparent white \
PNG32:png32.png
convert SampleLogo_1bit.EPS -colorspace RGB -transparent white \
PNG8:png8.png
If there is a bug, it's not in the PNG encoder but in the handling
of "-transparent white" with CMYK images.
Re: Convert EPS with Mac Preview to PNG
Posted: 2011-12-05T16:54:22-07:00
by fmw42
Glenn,
For vector input images (is not eps vector?), should not the -colorspace RGB be a read modifier and so go before the image.
convert -colorspace RGB image.eps -transparent white PNG32:result.png
etc for PNG8
It seems to work fine for me that way.
Fred
P.S. Using profiles to convert from cmyk to rgb might be more accurate.
Re: Convert EPS with Mac Preview to PNG
Posted: 2011-12-05T17:21:56-07:00
by glennrp
fmw42 wrote:Glenn,
For vector input images (is not eps vector?), should not the -colorspace RGB be a read modifier and so go before the image.
Dunno. I haven't got a clue about how read modifiers work with delegates. If it works for you then I guess putting it before is OK.
Glenn