Page 1 of 1

PS3 Coder doesn't work for images with alpha masks

Posted: 2009-06-15T11:39:02-07:00
by dlister
We use Image Magick to convert TIFFs to PostScript 3 EPS files. We tripped over a couple of bugs in the PS3 image coder with Image Magick 6.3.7. I believe that the bug persists in later releases.

The first bug concerned writing out the mask. The PS3 coder, as it stands right now, writes out an 8 bit image mask when a 1 bit image mask is required. The fix was to change color.c in the Magick core to look at the opacity channel if and only if the image has an associated mask.

The second bug concerned an extraneous "grestore" in the EPS prologue.

The third bug concerned a particular TIFF tickling a bug in the LZW encoder for PostScript output. I didn't have time to find a fix for this bug so I worked around it by Flate (ZIP) encoding the mask if the requested compression was JPEG, ZIP, or LZW encoding.

I can send the modified files to someone in the Image Magick developers group. Where should I send them?

Re: PS3 Coder doesn't work for images with alpha masks

Posted: 2009-06-15T13:09:08-07:00
by magick
Do you know how to create a patch file with the diff program? If so, post the patch here. Otherwise post a URL so we can download the modified files or send us a PM which allows attachments.