Documentation
¶
Overview ¶
Package imagedecode opens raster images in the formats the Rust shell's `image` crate decodes by default for wallpapers: PNG, JPEG, GIF, BMP, TIFF, WebP (stdlib and golang.org/x/image), plus farbfeld, PNM (P1-P6), and TGA, which Go has no decoder for and this package registers itself. SVG, JPEG XL, and AVIF are listed as wallpaper extensions but the Rust decoder rejects them as well.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeBytes ¶
DecodeBytes is how many bytes decoding the image file at path allocates for its pixels, read from its header before any pixel is: the decoded raster in its own color model, and for a JPEG the coefficient blocks a progressive scan keeps besides.
Types ¶
type Decoded ¶
Decoded is a decoded image whose pixels may live off the Go heap: Free releases them once nothing reads Image any more.
func OpenOffHeap ¶
OpenOffHeap decodes the image file at path as Open does, a JPEG straight into memory mem holds: its pixels until Free, and a progressive scan's coefficients only while it decodes.