XU XUv0.16.0

#image/jpeg

import: #image/jpeg

counts: 2 functions, 0 methods, 0 types, 0 constants, 0 method sets

Baseline JPEG decode and RGBA encode.

decode

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

Purpose

Decode data from encoded representation. Throws on failure; handle the error or propagate it to the caller.

Parameters

data &string
data (read-only borrow; caller keeps the original; type &string)

Returns

image.RGBA — a value of this type

encode_rgba

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

Purpose

Encode rgba data. Throws on failure; handle the error or propagate it to the caller.

Parameters

img &image.RGBA
img (read-only borrow; caller keeps the original; type &image.RGBA)

Returns

string — result string