package png

Import Path
	github.com/pancsta/d2/lib/png (on go.dev)

Dependency Relation
	imports 7 packages, and imported by one package

Involved Source Files png.go
Package-Level Functions (total 4)
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.
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.
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.
WriteExif writes D2's complete eXIf chunk. A streaming PNG encoder calls it after IHDR, before emitting image data, without retaining the encoded image.
Package-Level Constants (only one)
SCALE is the static raster device scale used by PNG, PDF, and PPTX export.