struct GIF
XuAPI
pub struct GIF {
pub width int
pub height int
pub img image.RGBA
}用途
公开结构体 `GIF`。
参数
widthint- 字段(int)
heightint- 字段(int)
imgimage.RGBA- 字段(image.RGBA)
API
#image/gifGIF 首帧解码与 RGBA 编码。
struct GIFpub struct GIF {
pub width int
pub height int
pub img image.RGBA
}公开结构体 `GIF`。
width intheight intimg image.RGBAdecodepub fn decode(src &string) GIF解码。失败时 throw。
src &stringGIF — 该类型的值
atpub fn at(g &GIF, x int, y int) color.RGBAat,返回 color.RGBA。
g &GIFx inty intcolor.RGBA — 该类型的值
encode_rgbapub fn encode_rgba(img &image.RGBA, pal &[]color.RGBA) string编码。失败时 throw。
img &image.RGBApal &[]color.RGBAstring — 结果字符串