#image/jpeg
Xu 0.16.0 API
import: #image/jpeg
counts: 2 functions, 0 methods, 0 types, 0 constants, 0 method sets
Baseline JPEG decode and RGBA encode.
decode
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
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