Convert EPS with Mac Preview to PNG
Convert EPS with Mac Preview to PNG
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
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
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert EPS with Mac Preview to PNG
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
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
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
Sample file located here: http://www.mediafire.com/file/o53yp2lt7 ... o_1bit.eps
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert EPS with Mac Preview to PNG
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
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
Can you explain what is happening with the versions that seem to be working? I am not following the syntax with those.
Thanks!
Thanks!
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert EPS with Mac Preview to PNG
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
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
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.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert EPS with Mac Preview to PNG
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
great, thanks. Please post any new developments in this area if you get a response.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert EPS with Mac Preview to PNG
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.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert EPS with Mac Preview to PNG
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
Sorry, I don't notice PMs. Now I see that there is a tiny notification
to watch for that in fhe future.
- User Control Panel (0 new messages
to watch for that in fhe future.
Re: Convert EPS with Mac Preview to PNG
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:
If there is a bug, it's not in the PNG encoder but in the handling
of "-transparent white" with CMYK images.
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
of "-transparent white" with CMYK images.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert EPS with Mac Preview to PNG
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.
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
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.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.
Glenn