Skip to main content

Module image_options

Module image_options 

Source
Expand description

Image payloads supplied to an export.

This crate never touches the filesystem — an inline image stores only a src string, and resolving that string to bytes is the embedding application’s job. Exports that need to embed an image therefore receive its bytes the same way the PDF exporter already receives fonts: handed over by the caller, keyed by exactly the src the document carries.

That indirection is deliberate. The alternative — having the exporter open files named by the document — would make export depend on the caller’s working directory, would let a document reference paths outside the project, and would make this crate’s behaviour untestable without a filesystem fixture.

Structs§

ExportImage
One image’s bytes, together with what they are.
ExportImages
Image bytes for one export, keyed by the src of the inline images that reference them.
HtmlExportOptions
Options for an HTML export.

Enums§

HtmlImageMode
How an HTML export represents an inline image.

Functions§

base64_encode
Base64 (standard alphabet, padded) for data: URIs.