GIF87a/GIF89a first-frame decode + encode aligned with `image/gif` Decode / Encode of a paletted 2-D image. No animation, no interlace, no Image interface: pixels land in image.RGBA.
Parameters
widthint
field (int)
heightint
field (int)
imgimage.RGBA
field (image.RGBA)
decode
XuAPI
pubfn decode(src &string) GIF
Purpose
Decode. Throws on failure.
Parameters
src&string
source (borrowed; caller keeps it; type &string)
Returns
GIF — a value of this type
at
XuAPI
pubfn at(g &GIF, x int, y int) color.RGBA
Purpose
at; returns color.RGBA.
Parameters
g&GIF
g (borrowed; caller keeps it; type &GIF)
xint
value (int)
yint
value (int)
Returns
color.RGBA — a value of this type
encode_rgba
XuAPI
pubfn encode_rgba(img &image.RGBA, pal &[]color.RGBA) string
Purpose
Encode. Throws on failure.
Parameters
img&image.RGBA
img (borrowed; caller keeps it; type &image.RGBA)
pal&[]color.RGBA
pal (borrowed; caller keeps it; type &[]color.RGBA)