How does IM convert transparent PNG to PDF?

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
etrader
Posts: 13
Joined: 2012-09-29T06:53:04-07:00
Authentication code: 67789

How does IM convert transparent PNG to PDF?

Post by etrader »

For embedding PNG inside PDF, it is necessary to separate alpha channel. I used IM to convert a transparent PNG to PDF, and the output PDF file contains

Code: Select all

8 0 obj
<<
/Type /XObject
/Subtype /Image
/Name /Im0
/Filter [ /FlateDecode ]
/Width 75
/Height 65
/ColorSpace 10 0 R
/BitsPerComponent 8
/SMask 15 0 R
/Length 9 0 R
>>
stream
CAPTURED_PNG_DATA
endstream
endobj
15 0 obj
<<
/Type /XObject
/Subtype /Image
/Name /Ma0
/Filter [ /FlateDecode ]
/Width 75
/Height 65
/ColorSpace /DeviceGray
/BitsPerComponent 8
/Length 16 0 R
>>
stream
CAPTURED_PNG_DATA
endstream
endobj
I want to know how IM captures the PNG data to be inserted into PDF document. In other words, if creating the PDF document manually, how to generate the CAPTURED_PNG_DATA from the original PNG by IM?
Post Reply