[gs-devel] Regarding Transparency while Converting PostScript to PNG

Russell Lang gsview at ghostgum.com.au
Sat Nov 29 20:10:12 PST 2003


Phong Ky,

> I am converting a PostScript file to PNG and want the transparency in the
> PNG. Is there an option to set while converting? Or does Ghostscript do the
> transparency automatically as long as the transparency is in the PostScript
> file?

If you use the pngalpha device instead of png16m, then unpainted 
areas will be left transparent, and edge pixels will use alpha 
for anti-aliasing. Anti-aliasing will be enabled by default, 
unlike png16m.  PostScript doesn't have standard way to express 
transparency (but PDF does) so this was a reasonable solution to 
allow the background of an image to be left transparent.  If the 
PostScript file explicitly fills the background, then nothing 
will be transparent.


Russell Lang                   gsview at ghostgum.com.au
Ghostgum Software Pty Ltd      http://www.ghostgum.com.au/





More information about the gs-devel mailing list