Expand description
§Image Loading and Decoding
Loads images from file paths, data URIs, or raw base64 strings and prepares them for PDF embedding. JPEG images pass through without re-encoding (the PDF spec supports DCTDecode natively). PNG images are decoded to RGB pixels with a separate alpha channel for SMask transparency.
Structs§
- Loaded
Image - A fully decoded/loaded image ready for PDF embedding.
Enums§
- Image
Pixel Data - The pixel data in a format the PDF serializer can consume directly.
- Jpeg
Color Space - JPEG color space for the PDF /ColorSpace entry.
Functions§
- load_
image - Load an image from a source string.
- load_
image_ dimensions - Read only the pixel dimensions from an image source without decoding pixels.
Returns (width, height) in pixels. Much cheaper than
load_image.