Skip to main content

Module image

Module image 

Source

Structs§

ImageInfo
Detected image metadata

Enums§

ImageFormat

Functions§

add_image_to_pdf
High-level: create a single-page PDF containing just the image
create_bmp_image_object
Create a PDF image XObject stream for BMP data (raw, no filter)
create_image_content_stream
Create content stream that draws an image XObject
create_image_object
Create a PDF image XObject from any supported image format
create_jpeg_image_object
Create a PDF image XObject stream for JPEG data (DCTDecode)
create_png_image_object
Create a PDF image XObject stream for PNG data (FlateDecode)
detect_image_format
Detect format from raw bytes
load_image
Load image from file, detect format, and extract dimensions and pixel data
load_image_with_alt_text
Load image from file with alternative text for accessibility
scale_to_fit
Scale dimensions to fit within max_width x max_height while preserving aspect ratio