pdfConvertRegionToDeviceNImageWithAlpha
The rectangular region is specified by the x,y coordinates of its upper-left corner and its width and height - in bitmap coordinates, not PDF coordinates. That is, if the whole-page bitmap would have been 1000 pixels wide and 2000 pixels high, and you request a region with (x,y) = (0,0) and (w,h) = (1000,500), the resulting bitmap will be the top fourth of the page.
This function differs from pdfConvertRegionToDeviceNImage
in that
it skips the final page compositing step, and maintains an alpha
bitmap. The alpha bitmap can be retrieved with
pdfGetDeviceNAlphaBitmap
.
Note: The alpha bitmap is only useful with PDF files that have been constructed with a transparent background.
After calling pdfConvertRegionToDeviceNImageWithAlpha
:
- call
pdfGetNumDeviceNChannels
to retrieve the number of color channels - call
pdfGetDeviceNChannelName
andpdfGetDeviceNChannelCMYK
to get the name and CMYK value for a particular channel - call
pdfGetDeviceNBitmap
to get a bitmap for a particular channel - call
pdfGetDeviceNAlphaBitmap
to get the alpha channel bitmap
pdfClearDeviceNImage
to release the memory used by
pdfConvertRegionToDeviceNImage
.
To enable an overprint preview rasterization, call pdfSetConfig
to
set the overprintPreview
parameter before
calling pdfConvertRegionToDeviceNImage
: