Skip to main content Crate imageoptimize Copy item path Source BlurProcess BrightenProcess ContrastProcess CropProcess Crop process crops the image. FlipProcess GrayProcess Gray process changes the image to gray mode. ImageInfo Holds a decoded RGBA image ready for encoding. Internally backed by RgbaImage
so all encoders can borrow its raw bytes without any intermediate copies. LoaderProcess Loader process loads the image data from http, file or base64. OptimProcess Optim process optimizes the image of multi format. PaddingProcess ProcessImage ResizeProcess Resize process resizes the image.
In exact mode (fit=false) it scales to the given width×height (0 = proportional).
In fit mode (fit=true) it scales down to fit within the bounds while preserving
aspect ratio; images already within the bounds are left untouched. RotateProcess SharpenProcess StripProcess WatermarkProcess Watermark process adds a watermark over the image. ImageError ImageProcessingError WatermarkPosition PROCESS_BLUR PROCESS_BRIGHTEN PROCESS_CONTRAST PROCESS_CROP PROCESS_DIFF PROCESS_FLIP PROCESS_GRAY PROCESS_LOAD PROCESS_OPTIM PROCESS_PADDING PROCESS_RESIZE PROCESS_ROTATE PROCESS_SHARPEN PROCESS_STRIP PROCESS_WATERMARK Process avif_decode Decode data from avif format, it supports rgb8,
rgba8, rgb16 and rgba16. load new_blur_task Gaussian blur. sigma controls the blur radius (e.g. 2.0). new_brighten_task value is added to each channel: positive brightens, negative darkens (-255..=255).new_contrast_task contrast > 0 increases contrast, < 0 decreases it.new_crop_task new_diff_task new_fit_task Resize to fit within max_width × max_height, preserving aspect ratio.
No-op when the image already fits. Pass 0 to leave a dimension unconstrained. new_flip_task new_gray_task new_load_task Run process image task.
Load task: [“load”, “url”]
Resize task: [“resize”, “width”, “height”]
Gray task: [“gray”]
Optim task: [“optim”, “webp”, “quality”, “speed”]
Crop task: [“crop”, “x”, “y”, “width”, “height”]
Watermark task: [“watermark”, “url”, “position”, “margin left”, “margin top”]
Diff task: [“diff”] new_optim_task new_padding_task Extend the canvas to width × height, centering the original. color is an
optional hex string (#rrggbb or #rrggbbaa); defaults to transparent. new_resize_task new_rotate_task new_sharpen_task USM sharpening. sigma controls blur radius (e.g. 1.0), threshold is the
minimum brightness difference to apply sharpening (e.g. 0). new_strip_task Strip EXIF metadata (including GPS) from the encoded buffer without re-encoding.
Supports JPEG, PNG, and WebP. Other formats are returned unchanged. new_watermark_task run run_with_image strip_exif_bytes Strip EXIF metadata from raw image bytes without re-encoding.
ext is the format extension ("jpeg", "jpg", "png", "webp").
Formats that are not supported are returned unchanged. to_gif