Documentation
¶
Overview ¶
Package imagecodec converts images into a form the PDF writer can embed, decoding the source bytes and re-encoding them when the original format is not directly supported.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Normalized ¶
Normalized is an image ready to embed: the encoded bytes, the format they are in, and the pixel size.
func NormalizeForPDF ¶
func NormalizeForPDF(data []byte, ext extension.Type) (Normalized, error)
NormalizeForPDF returns data in a format the PDF writer can embed. JPEG and PNG pass through; other formats, including SVG, are rasterized to PNG.
func (Normalized) HasDimensions ¶
func (n Normalized) HasDimensions() bool
HasDimensions reports whether both the width and height are known.