PDF's Invisible Layers

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?".
Post Reply
elisegev
Posts: 50
Joined: 2005-09-28T07:47:13-07:00
Contact:

PDF's Invisible Layers

Post by elisegev »

This is for ImageMagick 6.6.2. I have a Postscript file that is shown in Ghostscript 8.71 (gswin32) as having a white background, but in imdisplay it has a checkered background. Why? I believe that the way Ghostscript is showing the file is the correct one.

The file was generated with the pdf2ps (Ghostscript 8.71) utility from a PDF file that has several layers. Some layers are visible and some are not. When I use the convert utility to do PDF -> PNG with the flatten option, I get some features that are not in the original file. Why?

When I do PDF -> PS with pdf2ps and then use convert to do PS -> PNG with the flatten option, I get the correct image. I guess imdisplay does not support the flatten option as does convert. Are there any optional directives that can convert the PDF to PNG correctly?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: PDF's Invisible Layers

Post by fmw42 »

your pdf apparently has transparency so IM displays that with a checkered background.

flattening will take all layers and transparency and merge with some background color to make an image with one composite layer.
elisegev
Posts: 50
Joined: 2005-09-28T07:47:13-07:00
Contact:

Re: PDF's Invisible Layers

Post by elisegev »

fmw42 wrote:your pdf apparently has transparency so IM displays that with a checkered background.

flattening will take all layers and transparency and merge with some background color to make an image with one composite layer.
Why checkered background? Ghostscript does not put a checkered background to the image.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: PDF's Invisible Layers

Post by fmw42 »

Why checkered background? Ghostscript does not put a checkered background to the image.
I believe that is how the IM display program works with transparent images on Linux.

Photoshop does that also.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: PDF's Invisible Layers

Post by snibgo »

Gimp and many other tools also show a chequer background through transparency.

Other software shows white. Some show black.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: PDF's Invisible Layers

Post by fmw42 »

snibgo wrote:Gimp and many other tools also show a chequer background through transparency.

Other software shows white. Some show black.

Unfortunately on the Mac (OSX TIGER), I get no background and see right to my desktop. This is very awkward. It needs a background (gray or checkered)!

convert logo: -transparency white logot.png
display logot.png

same with

convert logot.png show:

Happens with png or gif
Last edited by fmw42 on 2010-07-07T18:26:51-07:00, edited 1 time in total.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: PDF's Invisible Layers

Post by snibgo »

fmw42 wrote:Unfortunately on the Mac (OSX TIGER), I get no background and see right to my desktop. This is very awkward.
That's probably the most logical scheme, until they can make computer screen go transparent so we can see the physical wall behind them.
snibgo's IM pages: im.snibgo.com
Post Reply