#[repr(C)]
pub struct avif_data_t { pub primary_data: *const u8, pub primary_size: usize, pub alpha_data: *const u8, pub alpha_size: usize, pub premultiplied_alpha: u8, /* private fields */ }
Expand description

Result of parsing an AVIF file. Contains AV1-compressed data.

Fields

primary_data: *const u8

AV1 data for color channels

primary_size: usizealpha_data: *const u8

AV1 data for alpha channel (may be NULL if the image is fully opaque)

alpha_size: usizepremultiplied_alpha: u8

0 = normal, uncorrelated alpha channel 1 = premultiplied alpha. You must divide RGB values by alpha.

if (a != 0) {r = r * 255 / a}

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.