#[repr(C)]pub struct heif_security_limits {Show 19 fields
pub version: u8,
pub max_image_size_pixels: u64,
pub max_number_of_tiles: u64,
pub max_bayer_pattern_pixels: u32,
pub max_items: u32,
pub max_color_profile_size: u32,
pub max_memory_block_size: u64,
pub max_components: u32,
pub max_iloc_extents_per_item: u32,
pub max_size_entity_group: u32,
pub max_children_per_box: u32,
pub max_total_memory: u64,
pub max_sample_description_box_entries: u32,
pub max_sample_group_description_box_entries: u32,
pub max_sequence_frames: u32,
pub max_number_of_file_brands: u32,
pub max_bad_pixels: u32,
pub max_iso23001_17_pixel_size_bytes: u32,
pub parent: *const heif_security_limits,
}Expand description
If you set a limit to 0, the limit is disabled.
Fields§
§version: u8§max_image_size_pixels: u64Limit on the maximum image size to avoid allocating too much memory. For example, setting this to 32768^2 pixels = 1 Gigapixels results in 1.5 GB memory need for YUV-4:2:0 or 4 GB for RGB32.
max_number_of_tiles: u64§max_bayer_pattern_pixels: u32Also used for polarization pattern (splz) size limit.
max_items: u32§max_color_profile_size: u32§max_memory_block_size: u64§max_components: u32§max_iloc_extents_per_item: u32§max_size_entity_group: u32§max_children_per_box: u32for all boxes that are not covered by other limits
max_total_memory: u64— version 2 (v1.20.0)
max_sample_description_box_entries: u32§max_sample_group_description_box_entries: u32§max_sequence_frames: u32— version 3 (v1.21.0)
max_number_of_file_brands: u32§max_bad_pixels: u32— version 4 (v1.22.0)
max_iso23001_17_pixel_size_bytes: u32Upper bound (in bytes) on the pixel_size field of an uncompressed (ISO 23001-17) uncC box. Caps the byte stride between adjacent pixels and prevents pathological padding values from blowing up tile-size arithmetic.
parent: *const heif_security_limitsInternal: when libheif derives a limits struct from another one (e.g. to tighten the maximum image size for a specific decode), this points back to the registered context whose total-memory budget the allocation should be accounted against. nullptr means “this is a root context” (the registered one). User code should leave this as nullptr; the field is set internally.
Trait Implementations§
Source§impl Clone for heif_security_limits
impl Clone for heif_security_limits
Source§fn clone(&self) -> heif_security_limits
fn clone(&self) -> heif_security_limits
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more