THotPDF.AddMonochromeImageAuto Method
Adds an image and lets HotPDF pick the compression for 1-bit content. It is the same as calling AddImage with icAutoMono: a 1-bit bitmap whose two palette colors are shades of grey uses Flate when it is small, CCITT Group 4 for medium sizes or PDF/A output and JBIG2 for large images. Every other image, including a 1-bit bitmap with a colored palette, uses Flate so its colors are kept
Declaration
function AddMonochromeImageAuto(Image: TGraphic): Integer;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
Image | A TBitmap or TJPEGImage to embed |
Return value
The image index to pass to ShowImage
Usage notes
- Either palette order works: a 1-bit bitmap that lists white before black is encoded with the same black and white as one that lists black first
- JBIG2 output follows the
JBIG2Optionsdefaults, which remove isolated specks of scanning noise; setRemoveIsolatedBlackPixelsto false to keep every pixel