PDF to PNG transparency conversion problem

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
jfplante
Posts: 10
Joined: 2011-08-15T13:26:13-07:00
Authentication code: 8675308

Re: PDF to PNG transparency conversion problem

Post by jfplante »

Thanks Fred, interesting observation about background transparency vs alpha channel, I'll dig into that direction.

Unfortunately, the "-transparent white" will not work in the general case, since all white in the images gets removed. With this image, i was trying to boil down the generic case problem I am having with other images to the most simple example that was failing.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: PDF to PNG transparency conversion problem

Post by fmw42 »

floodfill white to transparent would be better, but still may not handle every case, if the border of the main part of the image has any white.

I am not an expert on PDF files, but it does seem strange and somewhat like the Photoshop PSD and TIFF file background transparent. Though I don't really know if this is the case.
jfplante
Posts: 10
Joined: 2011-08-15T13:26:13-07:00
Authentication code: 8675308

Re: PDF to PNG transparency conversion problem

Post by jfplante »

Thanks again, yes there will still be some cases where floodfill would not work, as you mention. I will post here if I find any way out of this problem...
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: PDF to PNG transparency conversion problem

Post by anthony »

More than likely Photoshop PDF implements its own 'renderer' which avoides the 'white square'.

Ghostscript may not do it right, OR that is exactly the way the PDF does it.

That is either may be assuming a white background which is what PDF is ment for.

Perhaps this 'white square' problem is better directed to the Ghostscript Development Group. I do not however know if they have a wiki, or mailing image or what, but they probably have something. Just a matter of finding the right 'forum' for the developers.


Whatever you decide, please report back here, so others following this thread can know what you did and where you went.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
jfplante
Posts: 10
Joined: 2011-08-15T13:26:13-07:00
Authentication code: 8675308

Re: PDF to PNG transparency conversion problem

Post by jfplante »

I created a bug for that: http://bugs.ghostscript.com/show_bug.cgi?id=693024
Will keep you posted.
Post Reply