Package com.independentsoft.office.pdf
Class PdfImageEncoder
java.lang.Object
com.independentsoft.office.pdf.PdfImageEncoder
Prepares raster images for inclusion in PDF files. JPEG images are passed
through with the DCTDecode filter (including grayscale and Adobe CMYK
detection); all other formats are decoded with ImageIO and stored with the
FlateDecode filter, preserving an alpha channel as a soft mask.
-
Method Summary
Modifier and TypeMethodDescriptionstatic PdfEncodedImageencode(byte[] imageData)Encodes image data for PDF embedding.
-
Method Details
-
encode
Encodes image data for PDF embedding.- Parameters:
imageData- the raw image file bytes- Returns:
- the encoded image or null when the format is not supported
-