Documentation
¶
Index ¶
Constants ¶
const SCALE = 2.
SCALE is the static raster device scale used by PNG, PDF, and PPTX export.
Variables ¶
This section is empty.
Functions ¶
func AddExif ¶
AddExif returns png with D2's EXIF metadata inserted after IHDR. An existing EXIF chunk is replaced at its original position. The input is validated without copying chunk payloads so peak memory remains one input and one output buffer.
func AddExifInPlace ¶ added in v0.9.0
AddExifInPlace returns png with D2's EXIF metadata inserted after IHDR. It reuses the input's backing storage when it has sufficient spare capacity and otherwise allocates an exact-sized result. On success, callers must consider the input and every alias of its backing storage consumed. Invalid input is never modified.
func AddExifToEncoderOutputInPlace ¶ added in v0.9.0
AddExifToEncoderOutputInPlace inserts D2's EXIF metadata into a PNG emitted directly by an encoder. Unlike AddExifInPlace, it does not rescan and checksum every generated image-data chunk. It still verifies the fixed PNG envelope before modifying the input. Callers must not use it for untrusted or externally supplied PNG data.
Types ¶
This section is empty.