png

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(b []byte) (gdf.XImage, error)

Decode interprets b as data representing a PNG image. It decodes the image and returns a *gdf.Ximage and an error. The if the error is nil, the returned XObject can be drawn to a ContentStream. This function may not be ideal for all varieties of PNG. In particular, grayscale images with alpha channels are converted to their NRGBA equivalents, which may have the effect of significantly increasing the image's encoding size. Applications sensitive to performance may benefit from processing the image data separately and then generating the image's XObject representation by way of the gdf.NewImageXObj function.

func DecodeFile

func DecodeFile(path string) (gdf.XImage, error)

DecodeFile reads the contents of the file at the provided path and then calls Decode.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL