Converting EPS to GIF, loosing Transparency
Converting EPS to GIF, loosing Transparency
Is there a tick to getting transparency in GIF. I can run:
convert phone.eps phone.gif
and it creates a gif and converts transparency to white
if I do this instead:
convert phone.eps -transparent white phone.gif
it works, but I hear you can't hang you hat on that always working and we may not want white, why can't transparent stay transparent.
Is there a trick to getting these images (created in Illustrator/Photoshop) to convert with transparency.
Running: IM 6.8.9-4 q16 (64-bit) and GhostScript 9.14.
convert phone.eps phone.gif
and it creates a gif and converts transparency to white
if I do this instead:
convert phone.eps -transparent white phone.gif
it works, but I hear you can't hang you hat on that always working and we may not want white, why can't transparent stay transparent.
Is there a trick to getting these images (created in Illustrator/Photoshop) to convert with transparency.
Running: IM 6.8.9-4 q16 (64-bit) and GhostScript 9.14.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Converting EPS to GIF, loosing Transparency
I suggest you supply a link to your EPS.
snibgo's IM pages: im.snibgo.com
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Converting EPS to GIF, loosing Transparency
Code: Select all
convert -colorspace sRGB phone.eps out.png
snibgo's IM pages: im.snibgo.com
Re: Converting EPS to GIF, loosing Transparency
Wow, I tried so many combos. I know you rendered a png, but gif works with this as well. Thanks!
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Converting EPS to GIF, loosing Transparency
Note that GIF only supports binary transparency (on or off), while PNG supports 8-bit transparency (256 shades)
Re: Converting EPS to GIF, loosing Transparency
GIF is required output.
Is there a way to improve text output; it really is quite awful. If I flatten the image, text gets sharp but I lose transparency and my transparent background from the EPS turns white in the GIF.
Suggestions?
Is there a way to improve text output; it really is quite awful. If I flatten the image, text gets sharp but I lose transparency and my transparent background from the EPS turns white in the GIF.
Suggestions?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Converting EPS to GIF, loosing Transparency
We don't know what command you used, nor what result you got. How do you expect us to respond???stevenb46 wrote:Is there a way to improve text output; it really is quite awful.
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Converting EPS to GIF, loosing Transparency
Use supersampling (assuming you used snibgo's command above)
Note 72*4=288
Code: Select all
convert -colorspace sRGB -density 288 phone.eps -resize 25% out.png
- GeeMack
- Posts: 718
- Joined: 2015-12-01T22:09:46-07:00
- Authentication code: 1151
- Location: Central Illinois, USA
Re: Converting EPS to GIF, loosing Transparency
In most cases when you "-flatten" a stack of images, they will be flattened onto a canvas of the background color. In IM the default background color is white. If you want transparent areas to remain transparent you should use "-background none" before "-flatten".
GIFs can't display varying levels of transparency. Transparent is just on or off, so there won't be any anti-aliasing around text in transparent areas.
Re: Converting EPS to GIF, loosing Transparency
Text still does not look good. This is where I'm at right now.
convert -colorspace sRGB -density 960 -units PixelsPerInch "image.eps" -resize 10%% -weight Bolder -background none -flatten "image.gif"
Any suggestions?
convert -colorspace sRGB -density 960 -units PixelsPerInch "image.eps" -resize 10%% -weight Bolder -background none -flatten "image.gif"
Any suggestions?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Converting EPS to GIF, loosing Transparency
"-weight Bolder" will do nothing. "-background none -flatten" doesn't look useful either.
Without seeing your input or output, it's difficult to comment.
Without seeing your input or output, it's difficult to comment.
snibgo's IM pages: im.snibgo.com
Re: Converting EPS to GIF, loosing Transparency
Ok see attached, text in transparent background looks bad when conveted to GIF. Looks better without transparent background
https://www.dropbox.com/s/1yuzzwlwosvz6 ... e.eps?dl=0
Thanks much!
https://www.dropbox.com/s/1yuzzwlwosvz6 ... e.eps?dl=0
Thanks much!
Re: Converting EPS to GIF, loosing Transparency
Bump... any suggestions?
Note, as snibgo suggested I dropped, what he said.
now stands at:
convert -colorspace sRGB -density 960 -units PixelsPerInch "filename.eps" -resize 10%% "filename.gif"
Any suggestions?
Note, as snibgo suggested I dropped, what he said.
now stands at:
convert -colorspace sRGB -density 960 -units PixelsPerInch "filename.eps" -resize 10%% "filename.gif"
Any suggestions?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Converting EPS to GIF, loosing Transparency
It is not possible to maintain good text quality at such low resolution (resize 10%) when outputting to GIF, since GIF only supports binary transparency. The only way would be to flatten to some background color before resizing and thus lose your transparency. If you need to good quality, you will have to save to PNG or TIF.
If you do not resize, then it may look acceptable.
If you do not resize, then it may look acceptable.
Code: Select all
convert -colorspace sRGB -density 960 -units PixelsPerInch "image.eps" "image.gif"