Library guide · API index and notation
This page is generated from the bundled library in this checkout. Signatures and adjacent source comments are reproduced below; the linked guide explains usage, storage, failures, and platform support.
import "std/image/shared/binary"
Names used in signatures
Unqualified names denote this package’s types (including other source files in the same package), language built-ins, or generic parameters such as T. Qualified names use the import aliases below. These aliases belong to the library source; import a dependency yourself to use its alias in your program.
| Alias | Package | Source file |
|---|---|---|
pixels |
std/image/pixels |
binary.dodo |
u8_at
Function · Source
pub fn u8_at(data: &[u8], offset: usize) -> u8!pixels.Error
be16
Function · Source
pub fn be16(data: &[u8], offset: usize) -> u32!pixels.Error
be32
Function · Source
pub fn be32(data: &[u8], offset: usize) -> u32!pixels.Error
be64
Function · Source
pub fn be64(data: &[u8], offset: usize) -> u64!pixels.Error
le16
Function · Source
pub fn le16(data: &[u8], offset: usize) -> u32!pixels.Error
le32
Function · Source
pub fn le32(data: &[u8], offset: usize) -> u32!pixels.Error
put_be16
Function · Source
pub fn put_be16(output: &mut[u8], offset: usize, value: u32)
put_be32
Function · Source
pub fn put_be32(output: &mut[u8], offset: usize, value: u32)
put_le16
Function · Source
pub fn put_le16(output: &mut[u8], offset: usize, value: u32)
put_le32
Function · Source
pub fn put_le32(output: &mut[u8], offset: usize, value: u32)
range
Function · Source
The bytes data[offset..offset + length], or Truncated.
pub fn range(data: &[u8], offset: usize, length: usize) -> &[u8]!pixels.Error from(data)
check_dimensions
Function · Source
Width and height within pixels.MAX_DIMENSION, else TooLarge.
pub fn check_dimensions(width: u32, height: u32) -> void!pixels.Error
pixel_count
Function · Source
width * height, or TooLarge.
pub fn pixel_count(width: u32, height: u32) -> usize!pixels.Error