XU XUv0.8.8
中文

API

#image/jpeg

import: #image/jpeg

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

Baseline JPEG decode and RGBA encode.

decode

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

Purpose

Decode. Throws on failure.

Parameters

data &string
data (borrowed; caller keeps it; type &string)

Returns

image.RGBA — a value of this type

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