XU XUv0.8.8
中文

API

#image/png

import: #image/png

counts: 2 fns, 0 methods, 0 types, 0 consts, 0 ifaces

PNG encode/decode (8-bit, non-interlaced).

encode_rgba

XuAPI
pub fn encode_rgba(img &image.RGBA) string

Purpose

Encode. Throws on failure.

Parameters

img &image.RGBA
img (borrowed; caller keeps it; type &image.RGBA)

Returns

string — result string

decode

XuAPI
pub fn decode(src &string) image.RGBA

Purpose

Decode. Throws on failure.

Parameters

src &string
source (borrowed; caller keeps it; type &string)

Returns

image.RGBA — a value of this type