Generator¶
-
class img_gen.Generator(external_resource_paths: list[Path | str] | None =
None, cache_root: Path | str | None =None)¶ –
A class to represent an image generator.
The given
Layoutdescribes how to generate theImage.This struct caches the font database and font source client to avoid re-initializing them on every
render()call.
- class img_gen.Image¶
A class to represent an Image object.
This class cannot be constructed from python, rather it is returned from
Generator.render()- save(name: Path | str) None¶
–
Save the image data to a file.
Does not support SVG output. The image format is determined from the file extension in the given
name.
- sha256¶
A hexadecimal string representing the SHA256 hash digest of the image data.