Overview
graphitepdf-image provides typed image sources, decoded image assets, and async resolution helpers for raster and SVG image inputs.
Scope
graphitepdf-image contains:
ImageSourcewith data, local, remote, and data-URI variantsImageFormat,RasterImage,SvgImage, andImageImageCacheandResolveImageOptions- async asset resolution helpers such as
resolve_image()andresolve_image_with_options()
Installation
API Summary
| Category | Items |
|---|---|
| Image sources | ImageSource, DataImageSource, LocalImageSource, RemoteImageSource, DataUriImageSource |
| Source options | RemoteMethod, RemoteCredentials, ResolveImageOptions |
| Decoded assets | Image, RasterImage, SvgImage, ImageAsset |
| Runtime helpers | ImageCache, resolve_image(), resolve_image_with_options() |
Example
use ;
Design Principles
- keep image inputs typed and explicit
- separate source descriptions from decoded assets
- support caching and async loading without forcing rendering policy
- make SVG images first-class alongside raster images
Role In GraphitePDF
This crate is a shared asset service for layout, render, document, and kit. It is where raw image inputs become reusable Image assets.
License
MIT