pub type __uint8_t = libc::c_uchar;
pub type __uint32_t = libc::c_uint;
pub type __int64_t = libc::c_long;
extern "C" {
pub fn heif_get_version() -> *const libc::c_char;
}
extern "C" {
pub fn heif_get_version_number() -> u32;
}
extern "C" {
pub fn heif_get_version_number_major() -> libc::c_int;
}
extern "C" {
pub fn heif_get_version_number_minor() -> libc::c_int;
}
extern "C" {
pub fn heif_get_version_number_maintenance() -> libc::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct heif_context {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct heif_image_handle {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct heif_image {
_unused: [u8; 0],
}
pub const heif_error_code_heif_error_Ok: heif_error_code = 0;
pub const heif_error_code_heif_error_Input_does_not_exist: heif_error_code = 1;
pub const heif_error_code_heif_error_Invalid_input: heif_error_code = 2;
pub const heif_error_code_heif_error_Unsupported_filetype: heif_error_code = 3;
pub const heif_error_code_heif_error_Unsupported_feature: heif_error_code = 4;
pub const heif_error_code_heif_error_Usage_error: heif_error_code = 5;
pub const heif_error_code_heif_error_Memory_allocation_error: heif_error_code = 6;
pub const heif_error_code_heif_error_Decoder_plugin_error: heif_error_code = 7;
pub const heif_error_code_heif_error_Encoder_plugin_error: heif_error_code = 8;
pub const heif_error_code_heif_error_Encoding_error: heif_error_code = 9;
pub type heif_error_code = libc::c_uint;
pub const heif_suberror_code_heif_suberror_Unspecified: heif_suberror_code = 0;
pub const heif_suberror_code_heif_suberror_End_of_data: heif_suberror_code = 100;
pub const heif_suberror_code_heif_suberror_Invalid_box_size: heif_suberror_code = 101;
pub const heif_suberror_code_heif_suberror_No_ftyp_box: heif_suberror_code = 102;
pub const heif_suberror_code_heif_suberror_No_idat_box: heif_suberror_code = 103;
pub const heif_suberror_code_heif_suberror_No_meta_box: heif_suberror_code = 104;
pub const heif_suberror_code_heif_suberror_No_hdlr_box: heif_suberror_code = 105;
pub const heif_suberror_code_heif_suberror_No_hvcC_box: heif_suberror_code = 106;
pub const heif_suberror_code_heif_suberror_No_pitm_box: heif_suberror_code = 107;
pub const heif_suberror_code_heif_suberror_No_ipco_box: heif_suberror_code = 108;
pub const heif_suberror_code_heif_suberror_No_ipma_box: heif_suberror_code = 109;
pub const heif_suberror_code_heif_suberror_No_iloc_box: heif_suberror_code = 110;
pub const heif_suberror_code_heif_suberror_No_iinf_box: heif_suberror_code = 111;
pub const heif_suberror_code_heif_suberror_No_iprp_box: heif_suberror_code = 112;
pub const heif_suberror_code_heif_suberror_No_iref_box: heif_suberror_code = 113;
pub const heif_suberror_code_heif_suberror_No_pict_handler: heif_suberror_code = 114;
pub const heif_suberror_code_heif_suberror_Ipma_box_references_nonexisting_property:
heif_suberror_code = 115;
pub const heif_suberror_code_heif_suberror_No_properties_assigned_to_item: heif_suberror_code = 116;
pub const heif_suberror_code_heif_suberror_No_item_data: heif_suberror_code = 117;
pub const heif_suberror_code_heif_suberror_Invalid_grid_data: heif_suberror_code = 118;
pub const heif_suberror_code_heif_suberror_Missing_grid_images: heif_suberror_code = 119;
pub const heif_suberror_code_heif_suberror_Invalid_clean_aperture: heif_suberror_code = 120;
pub const heif_suberror_code_heif_suberror_Invalid_overlay_data: heif_suberror_code = 121;
pub const heif_suberror_code_heif_suberror_Overlay_image_outside_of_canvas: heif_suberror_code =
122;
pub const heif_suberror_code_heif_suberror_Auxiliary_image_type_unspecified: heif_suberror_code =
123;
pub const heif_suberror_code_heif_suberror_No_or_invalid_primary_item: heif_suberror_code = 124;
pub const heif_suberror_code_heif_suberror_No_infe_box: heif_suberror_code = 125;
pub const heif_suberror_code_heif_suberror_Unknown_color_profile_type: heif_suberror_code = 126;
pub const heif_suberror_code_heif_suberror_Wrong_tile_image_chroma_format: heif_suberror_code = 127;
pub const heif_suberror_code_heif_suberror_Invalid_fractional_number: heif_suberror_code = 128;
pub const heif_suberror_code_heif_suberror_Invalid_image_size: heif_suberror_code = 129;
pub const heif_suberror_code_heif_suberror_Invalid_pixi_box: heif_suberror_code = 130;
pub const heif_suberror_code_heif_suberror_No_av1C_box: heif_suberror_code = 131;
pub const heif_suberror_code_heif_suberror_Security_limit_exceeded: heif_suberror_code = 1000;
pub const heif_suberror_code_heif_suberror_Nonexisting_item_referenced: heif_suberror_code = 2000;
pub const heif_suberror_code_heif_suberror_Null_pointer_argument: heif_suberror_code = 2001;
pub const heif_suberror_code_heif_suberror_Nonexisting_image_channel_referenced:
heif_suberror_code = 2002;
pub const heif_suberror_code_heif_suberror_Unsupported_plugin_version: heif_suberror_code = 2003;
pub const heif_suberror_code_heif_suberror_Unsupported_writer_version: heif_suberror_code = 2004;
pub const heif_suberror_code_heif_suberror_Unsupported_parameter: heif_suberror_code = 2005;
pub const heif_suberror_code_heif_suberror_Invalid_parameter_value: heif_suberror_code = 2006;
pub const heif_suberror_code_heif_suberror_Unsupported_codec: heif_suberror_code = 3000;
pub const heif_suberror_code_heif_suberror_Unsupported_image_type: heif_suberror_code = 3001;
pub const heif_suberror_code_heif_suberror_Unsupported_data_version: heif_suberror_code = 3002;
pub const heif_suberror_code_heif_suberror_Unsupported_color_conversion: heif_suberror_code = 3003;
pub const heif_suberror_code_heif_suberror_Unsupported_item_construction_method:
heif_suberror_code = 3004;
pub const heif_suberror_code_heif_suberror_Unsupported_bit_depth: heif_suberror_code = 4000;
pub const heif_suberror_code_heif_suberror_Cannot_write_output_data: heif_suberror_code = 5000;
pub type heif_suberror_code = libc::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct heif_error {
pub code: heif_error_code,
pub subcode: heif_suberror_code,
pub message: *const libc::c_char,
}
#[test]
fn bindgen_test_layout_heif_error() {
assert_eq!(
::core::mem::size_of::<heif_error>(),
16usize,
concat!("Size of: ", stringify!(heif_error))
);
assert_eq!(
::core::mem::align_of::<heif_error>(),
8usize,
concat!("Alignment of ", stringify!(heif_error))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<heif_error>())).code as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(heif_error),
"::",
stringify!(code)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<heif_error>())).subcode as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(heif_error),
"::",
stringify!(subcode)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<heif_error>())).message as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(heif_error),
"::",
stringify!(message)
)
);
}
pub type heif_item_id = u32;
pub const heif_filetype_result_heif_filetype_no: heif_filetype_result = 0;
pub const heif_filetype_result_heif_filetype_yes_supported: heif_filetype_result = 1;
pub const heif_filetype_result_heif_filetype_yes_unsupported: heif_filetype_result = 2;
pub const heif_filetype_result_heif_filetype_maybe: heif_filetype_result = 3;
pub type heif_filetype_result = libc::c_uint;
extern "C" {
pub fn heif_check_filetype(data: *const u8, len: libc::c_int) -> heif_filetype_result;
}
pub const heif_brand_heif_unknown_brand: heif_brand = 0;
pub const heif_brand_heif_heic: heif_brand = 1;
pub const heif_brand_heif_heix: heif_brand = 2;
pub const heif_brand_heif_hevc: heif_brand = 3;
pub const heif_brand_heif_hevx: heif_brand = 4;
pub const heif_brand_heif_heim: heif_brand = 5;
pub const heif_brand_heif_heis: heif_brand = 6;
pub const heif_brand_heif_hevm: heif_brand = 7;
pub const heif_brand_heif_hevs: heif_brand = 8;
pub const heif_brand_heif_mif1: heif_brand = 9;
pub const heif_brand_heif_msf1: heif_brand = 10;
pub const heif_brand_heif_avif: heif_brand = 11;
pub const heif_brand_heif_avis: heif_brand = 12;
pub type heif_brand = libc::c_uint;
extern "C" {
pub fn heif_main_brand(data: *const u8, len: libc::c_int) -> heif_brand;
}
extern "C" {
pub fn heif_get_file_mime_type(data: *const u8, len: libc::c_int) -> *const libc::c_char;
}
extern "C" {
pub fn heif_context_alloc() -> *mut heif_context;
}
extern "C" {
pub fn heif_context_free(arg1: *mut heif_context);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct heif_reading_options {
_unused: [u8; 0],
}
pub const heif_reader_grow_status_heif_reader_grow_status_size_reached: heif_reader_grow_status = 0;
pub const heif_reader_grow_status_heif_reader_grow_status_timeout: heif_reader_grow_status = 1;
pub const heif_reader_grow_status_heif_reader_grow_status_size_beyond_eof: heif_reader_grow_status =
2;
pub type heif_reader_grow_status = libc::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct heif_reader {
pub reader_api_version: libc::c_int,
pub get_position:
::core::option::Option<unsafe extern "C" fn(userdata: *mut libc::c_void) -> i64>,
pub read: ::core::option::Option<
unsafe extern "C" fn(
data: *mut libc::c_void,
size: usize,
userdata: *mut libc::c_void,
) -> libc::c_int,
>,
pub seek: ::core::option::Option<
unsafe extern "C" fn(position: i64, userdata: *mut libc::c_void) -> libc::c_int,
>,
pub wait_for_file_size: ::core::option::Option<
unsafe extern "C" fn(
target_size: i64,
userdata: *mut libc::c_void,
) -> heif_reader_grow_status,
>,
}
#[test]
fn bindgen_test_layout_heif_reader() {
assert_eq!(
::core::mem::size_of::<heif_reader>(),
40usize,
concat!("Size of: ", stringify!(heif_reader))
);
assert_eq!(
::core::mem::align_of::<heif_reader>(),
8usize,
concat!("Alignment of ", stringify!(heif_reader))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<heif_reader>())).reader_api_version as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(heif_reader),
"::",
stringify!(reader_api_version)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<heif_reader>())).get_position as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(heif_reader),
"::",
stringify!(get_position)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<heif_reader>())).read as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(heif_reader),
"::",
stringify!(read)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<heif_reader>())).seek as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(heif_reader),
"::",
stringify!(seek)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<heif_reader>())).wait_for_file_size as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(heif_reader),
"::",
stringify!(wait_for_file_size)
)
);
}
extern "C" {
pub fn heif_context_read_from_file(
arg1: *mut heif_context,
filename: *const libc::c_char,
arg2: *const heif_reading_options,
) -> heif_error;
}
extern "C" {
pub fn heif_context_read_from_memory(
arg1: *mut heif_context,
mem: *const libc::c_void,
size: usize,
arg2: *const heif_reading_options,
) -> heif_error;
}
extern "C" {
pub fn heif_context_read_from_memory_without_copy(
arg1: *mut heif_context,
mem: *const libc::c_void,
size: usize,
arg2: *const heif_reading_options,
) -> heif_error;
}
extern "C" {
pub fn heif_context_read_from_reader(
arg1: *mut heif_context,
reader: *const heif_reader,
userdata: *mut libc::c_void,
arg2: *const heif_reading_options,
) -> heif_error;
}
extern "C" {
pub fn heif_context_get_number_of_top_level_images(ctx: *mut heif_context) -> libc::c_int;
}
extern "C" {
pub fn heif_context_is_top_level_image_ID(
ctx: *mut heif_context,
id: heif_item_id,
) -> libc::c_int;
}
extern "C" {
pub fn heif_context_get_list_of_top_level_image_IDs(
ctx: *mut heif_context,
ID_array: *mut heif_item_id,
count: libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn heif_context_get_primary_image_ID(
ctx: *mut heif_context,
id: *mut heif_item_id,
) -> heif_error;
}
extern "C" {
pub fn heif_context_get_primary_image_handle(
ctx: *mut heif_context,
arg1: *mut *mut heif_image_handle,
) -> heif_error;
}
extern "C" {
pub fn heif_context_get_image_handle(
ctx: *mut heif_context,
id: heif_item_id,
arg1: *mut *mut heif_image_handle,
) -> heif_error;
}
extern "C" {
pub fn heif_context_debug_dump_boxes_to_file(ctx: *mut heif_context, fd: libc::c_int);
}
extern "C" {
pub fn heif_context_set_maximum_image_size_limit(
ctx: *mut heif_context,
maximum_width: libc::c_int,
);
}
extern "C" {
pub fn heif_image_handle_release(arg1: *const heif_image_handle);
}
extern "C" {
pub fn heif_image_handle_is_primary_image(handle: *const heif_image_handle) -> libc::c_int;
}
extern "C" {
pub fn heif_image_handle_get_width(handle: *const heif_image_handle) -> libc::c_int;
}
extern "C" {
pub fn heif_image_handle_get_height(handle: *const heif_image_handle) -> libc::c_int;
}
extern "C" {
pub fn heif_image_handle_has_alpha_channel(arg1: *const heif_image_handle) -> libc::c_int;
}
extern "C" {
pub fn heif_image_handle_get_luma_bits_per_pixel(arg1: *const heif_image_handle)
-> libc::c_int;
}
extern "C" {
pub fn heif_image_handle_get_chroma_bits_per_pixel(
arg1: *const heif_image_handle,
) -> libc::c_int;
}
extern "C" {
pub fn heif_image_handle_get_ispe_width(handle: *const heif_image_handle) -> libc::c_int;
}
extern "C" {
pub fn heif_image_handle_get_ispe_height(handle: *const heif_image_handle) -> libc::c_int;
}
extern "C" {
pub fn heif_image_handle_has_depth_image(arg1: *const heif_image_handle) -> libc::c_int;
}
extern "C" {
pub fn heif_image_handle_get_number_of_depth_images(
handle: *const heif_image_handle,
) -> libc::c_int;
}
extern "C" {
pub fn heif_image_handle_get_list_of_depth_image_IDs(
handle: *const heif_image_handle,
ids: *mut heif_item_id,
count: libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn heif_image_handle_get_depth_image_handle(
handle: *const heif_image_handle,
depth_image_id: heif_item_id,
out_depth_handle: *mut *mut heif_image_handle,
) -> heif_error;
}
pub const heif_depth_representation_type_heif_depth_representation_type_uniform_inverse_Z:
heif_depth_representation_type = 0;
pub const heif_depth_representation_type_heif_depth_representation_type_uniform_disparity:
heif_depth_representation_type = 1;
pub const heif_depth_representation_type_heif_depth_representation_type_uniform_Z:
heif_depth_representation_type = 2;
pub const heif_depth_representation_type_heif_depth_representation_type_nonuniform_disparity:
heif_depth_representation_type = 3;
pub type heif_depth_representation_type = libc::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct heif_depth_representation_info {
pub version: u8,
pub has_z_near: u8,
pub has_z_far: u8,
pub has_d_min: u8,
pub has_d_max: u8,
pub z_near: f64,
pub z_far: f64,
pub d_min: f64,
pub d_max: f64,
pub depth_representation_type: heif_depth_representation_type,
pub disparity_reference_view: u32,
pub depth_nonlinear_representation_model_size: u32,
pub depth_nonlinear_representation_model: *mut u8,
}
#[test]
fn bindgen_test_layout_heif_depth_representation_info() {
assert_eq!(
::core::mem::size_of::<heif_depth_representation_info>(),
64usize,
concat!("Size of: ", stringify!(heif_depth_representation_info))
);
assert_eq!(
::core::mem::align_of::<heif_depth_representation_info>(),
8usize,
concat!("Alignment of ", stringify!(heif_depth_representation_info))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_depth_representation_info>())).version as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(heif_depth_representation_info),
"::",
stringify!(version)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_depth_representation_info>())).has_z_near as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(heif_depth_representation_info),
"::",
stringify!(has_z_near)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_depth_representation_info>())).has_z_far as *const _
as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(heif_depth_representation_info),
"::",
stringify!(has_z_far)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_depth_representation_info>())).has_d_min as *const _
as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(heif_depth_representation_info),
"::",
stringify!(has_d_min)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_depth_representation_info>())).has_d_max as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(heif_depth_representation_info),
"::",
stringify!(has_d_max)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_depth_representation_info>())).z_near as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(heif_depth_representation_info),
"::",
stringify!(z_near)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_depth_representation_info>())).z_far as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(heif_depth_representation_info),
"::",
stringify!(z_far)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_depth_representation_info>())).d_min as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(heif_depth_representation_info),
"::",
stringify!(d_min)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_depth_representation_info>())).d_max as *const _ as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(heif_depth_representation_info),
"::",
stringify!(d_max)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_depth_representation_info>())).depth_representation_type
as *const _ as usize
},
40usize,
concat!(
"Offset of field: ",
stringify!(heif_depth_representation_info),
"::",
stringify!(depth_representation_type)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_depth_representation_info>())).disparity_reference_view
as *const _ as usize
},
44usize,
concat!(
"Offset of field: ",
stringify!(heif_depth_representation_info),
"::",
stringify!(disparity_reference_view)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_depth_representation_info>()))
.depth_nonlinear_representation_model_size as *const _ as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(heif_depth_representation_info),
"::",
stringify!(depth_nonlinear_representation_model_size)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_depth_representation_info>()))
.depth_nonlinear_representation_model as *const _ as usize
},
56usize,
concat!(
"Offset of field: ",
stringify!(heif_depth_representation_info),
"::",
stringify!(depth_nonlinear_representation_model)
)
);
}
extern "C" {
pub fn heif_depth_representation_info_free(info: *const heif_depth_representation_info);
}
extern "C" {
pub fn heif_image_handle_get_depth_image_representation_info(
handle: *const heif_image_handle,
depth_image_id: heif_item_id,
out: *mut *const heif_depth_representation_info,
) -> libc::c_int;
}
extern "C" {
pub fn heif_image_handle_get_number_of_thumbnails(
handle: *const heif_image_handle,
) -> libc::c_int;
}
extern "C" {
pub fn heif_image_handle_get_list_of_thumbnail_IDs(
handle: *const heif_image_handle,
ids: *mut heif_item_id,
count: libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn heif_image_handle_get_thumbnail(
main_image_handle: *const heif_image_handle,
thumbnail_id: heif_item_id,
out_thumbnail_handle: *mut *mut heif_image_handle,
) -> heif_error;
}
extern "C" {
pub fn heif_image_handle_get_number_of_metadata_blocks(
handle: *const heif_image_handle,
type_filter: *const libc::c_char,
) -> libc::c_int;
}
extern "C" {
pub fn heif_image_handle_get_list_of_metadata_block_IDs(
handle: *const heif_image_handle,
type_filter: *const libc::c_char,
ids: *mut heif_item_id,
count: libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn heif_image_handle_get_metadata_type(
handle: *const heif_image_handle,
metadata_id: heif_item_id,
) -> *const libc::c_char;
}
extern "C" {
pub fn heif_image_handle_get_metadata_content_type(
handle: *const heif_image_handle,
metadata_id: heif_item_id,
) -> *const libc::c_char;
}
extern "C" {
pub fn heif_image_handle_get_metadata_size(
handle: *const heif_image_handle,
metadata_id: heif_item_id,
) -> usize;
}
extern "C" {
pub fn heif_image_handle_get_metadata(
handle: *const heif_image_handle,
metadata_id: heif_item_id,
out_data: *mut libc::c_void,
) -> heif_error;
}
pub const heif_color_profile_type_heif_color_profile_type_not_present: heif_color_profile_type = 0;
pub const heif_color_profile_type_heif_color_profile_type_nclx: heif_color_profile_type =
1852009592;
pub const heif_color_profile_type_heif_color_profile_type_rICC: heif_color_profile_type =
1917403971;
pub const heif_color_profile_type_heif_color_profile_type_prof: heif_color_profile_type =
1886547814;
pub type heif_color_profile_type = libc::c_uint;
extern "C" {
pub fn heif_image_handle_get_color_profile_type(
handle: *const heif_image_handle,
) -> heif_color_profile_type;
}
extern "C" {
pub fn heif_image_handle_get_raw_color_profile_size(handle: *const heif_image_handle) -> usize;
}
extern "C" {
pub fn heif_image_handle_get_raw_color_profile(
handle: *const heif_image_handle,
out_data: *mut libc::c_void,
) -> heif_error;
}
pub const heif_color_primaries_heif_color_primaries_ITU_R_BT_709_5: heif_color_primaries = 1;
pub const heif_color_primaries_heif_color_primaries_unspecified: heif_color_primaries = 2;
pub const heif_color_primaries_heif_color_primaries_ITU_R_BT_470_6_System_M: heif_color_primaries =
4;
pub const heif_color_primaries_heif_color_primaries_ITU_R_BT_470_6_System_B_G:
heif_color_primaries = 5;
pub const heif_color_primaries_heif_color_primaries_ITU_R_BT_601_6: heif_color_primaries = 6;
pub const heif_color_primaries_heif_color_primaries_SMPTE_240M: heif_color_primaries = 7;
pub const heif_color_primaries_heif_color_primaries_generic_film: heif_color_primaries = 8;
pub const heif_color_primaries_heif_color_primaries_ITU_R_BT_2020_2_and_2100_0:
heif_color_primaries = 9;
pub const heif_color_primaries_heif_color_primaries_SMPTE_ST_428_1: heif_color_primaries = 10;
pub const heif_color_primaries_heif_color_primaries_SMPTE_RP_431_2: heif_color_primaries = 11;
pub const heif_color_primaries_heif_color_primaries_SMPTE_EG_432_1: heif_color_primaries = 12;
pub const heif_color_primaries_heif_color_primaries_EBU_Tech_3213_E: heif_color_primaries = 22;
pub type heif_color_primaries = libc::c_uint;
pub const heif_transfer_characteristics_heif_transfer_characteristic_ITU_R_BT_709_5:
heif_transfer_characteristics = 1;
pub const heif_transfer_characteristics_heif_transfer_characteristic_unspecified:
heif_transfer_characteristics = 2;
pub const heif_transfer_characteristics_heif_transfer_characteristic_ITU_R_BT_470_6_System_M:
heif_transfer_characteristics = 4;
pub const heif_transfer_characteristics_heif_transfer_characteristic_ITU_R_BT_470_6_System_B_G:
heif_transfer_characteristics = 5;
pub const heif_transfer_characteristics_heif_transfer_characteristic_ITU_R_BT_601_6:
heif_transfer_characteristics = 6;
pub const heif_transfer_characteristics_heif_transfer_characteristic_SMPTE_240M:
heif_transfer_characteristics = 7;
pub const heif_transfer_characteristics_heif_transfer_characteristic_linear:
heif_transfer_characteristics = 8;
pub const heif_transfer_characteristics_heif_transfer_characteristic_logarithmic_100:
heif_transfer_characteristics = 9;
pub const heif_transfer_characteristics_heif_transfer_characteristic_logarithmic_100_sqrt10:
heif_transfer_characteristics = 10;
pub const heif_transfer_characteristics_heif_transfer_characteristic_IEC_61966_2_4:
heif_transfer_characteristics = 11;
pub const heif_transfer_characteristics_heif_transfer_characteristic_ITU_R_BT_1361:
heif_transfer_characteristics = 12;
pub const heif_transfer_characteristics_heif_transfer_characteristic_IEC_61966_2_1:
heif_transfer_characteristics = 13;
pub const heif_transfer_characteristics_heif_transfer_characteristic_ITU_R_BT_2020_2_10bit:
heif_transfer_characteristics = 14;
pub const heif_transfer_characteristics_heif_transfer_characteristic_ITU_R_BT_2020_2_12bit:
heif_transfer_characteristics = 15;
pub const heif_transfer_characteristics_heif_transfer_characteristic_ITU_R_BT_2100_0_PQ:
heif_transfer_characteristics = 16;
pub const heif_transfer_characteristics_heif_transfer_characteristic_SMPTE_ST_428_1:
heif_transfer_characteristics = 17;
pub const heif_transfer_characteristics_heif_transfer_characteristic_ITU_R_BT_2100_0_HLG:
heif_transfer_characteristics = 18;
pub type heif_transfer_characteristics = libc::c_uint;
pub const heif_matrix_coefficients_heif_matrix_coefficients_RGB_GBR: heif_matrix_coefficients = 0;
pub const heif_matrix_coefficients_heif_matrix_coefficients_ITU_R_BT_709_5:
heif_matrix_coefficients = 1;
pub const heif_matrix_coefficients_heif_matrix_coefficients_unspecified: heif_matrix_coefficients =
2;
pub const heif_matrix_coefficients_heif_matrix_coefficients_US_FCC_T47: heif_matrix_coefficients =
4;
pub const heif_matrix_coefficients_heif_matrix_coefficients_ITU_R_BT_470_6_System_B_G:
heif_matrix_coefficients = 5;
pub const heif_matrix_coefficients_heif_matrix_coefficients_ITU_R_BT_601_6:
heif_matrix_coefficients = 6;
pub const heif_matrix_coefficients_heif_matrix_coefficients_SMPTE_240M: heif_matrix_coefficients =
7;
pub const heif_matrix_coefficients_heif_matrix_coefficients_YCgCo: heif_matrix_coefficients = 8;
pub const heif_matrix_coefficients_heif_matrix_coefficients_ITU_R_BT_2020_2_non_constant_luminance : heif_matrix_coefficients = 9 ;
pub const heif_matrix_coefficients_heif_matrix_coefficients_ITU_R_BT_2020_2_constant_luminance:
heif_matrix_coefficients = 10;
pub const heif_matrix_coefficients_heif_matrix_coefficients_SMPTE_ST_2085:
heif_matrix_coefficients = 11;
pub const heif_matrix_coefficients_heif_matrix_coefficients_chromaticity_derived_non_constant_luminance : heif_matrix_coefficients = 12 ;
pub const heif_matrix_coefficients_heif_matrix_coefficients_chromaticity_derived_constant_luminance : heif_matrix_coefficients = 13 ;
pub const heif_matrix_coefficients_heif_matrix_coefficients_ICtCp: heif_matrix_coefficients = 14;
pub type heif_matrix_coefficients = libc::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct heif_color_profile_nclx {
pub version: u8,
pub color_primaries: heif_color_primaries,
pub transfer_characteristics: heif_transfer_characteristics,
pub matrix_coefficients: heif_matrix_coefficients,
pub full_range_flag: u8,
pub color_primary_red_x: f32,
pub color_primary_red_y: f32,
pub color_primary_green_x: f32,
pub color_primary_green_y: f32,
pub color_primary_blue_x: f32,
pub color_primary_blue_y: f32,
pub color_primary_white_x: f32,
pub color_primary_white_y: f32,
}
#[test]
fn bindgen_test_layout_heif_color_profile_nclx() {
assert_eq!(
::core::mem::size_of::<heif_color_profile_nclx>(),
52usize,
concat!("Size of: ", stringify!(heif_color_profile_nclx))
);
assert_eq!(
::core::mem::align_of::<heif_color_profile_nclx>(),
4usize,
concat!("Alignment of ", stringify!(heif_color_profile_nclx))
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_color_profile_nclx>())).version as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(heif_color_profile_nclx),
"::",
stringify!(version)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_color_profile_nclx>())).color_primaries as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(heif_color_profile_nclx),
"::",
stringify!(color_primaries)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_color_profile_nclx>())).transfer_characteristics
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(heif_color_profile_nclx),
"::",
stringify!(transfer_characteristics)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_color_profile_nclx>())).matrix_coefficients as *const _
as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(heif_color_profile_nclx),
"::",
stringify!(matrix_coefficients)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_color_profile_nclx>())).full_range_flag as *const _
as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(heif_color_profile_nclx),
"::",
stringify!(full_range_flag)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_color_profile_nclx>())).color_primary_red_x as *const _
as usize
},
20usize,
concat!(
"Offset of field: ",
stringify!(heif_color_profile_nclx),
"::",
stringify!(color_primary_red_x)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_color_profile_nclx>())).color_primary_red_y as *const _
as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(heif_color_profile_nclx),
"::",
stringify!(color_primary_red_y)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_color_profile_nclx>())).color_primary_green_x as *const _
as usize
},
28usize,
concat!(
"Offset of field: ",
stringify!(heif_color_profile_nclx),
"::",
stringify!(color_primary_green_x)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_color_profile_nclx>())).color_primary_green_y as *const _
as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(heif_color_profile_nclx),
"::",
stringify!(color_primary_green_y)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_color_profile_nclx>())).color_primary_blue_x as *const _
as usize
},
36usize,
concat!(
"Offset of field: ",
stringify!(heif_color_profile_nclx),
"::",
stringify!(color_primary_blue_x)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_color_profile_nclx>())).color_primary_blue_y as *const _
as usize
},
40usize,
concat!(
"Offset of field: ",
stringify!(heif_color_profile_nclx),
"::",
stringify!(color_primary_blue_y)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_color_profile_nclx>())).color_primary_white_x as *const _
as usize
},
44usize,
concat!(
"Offset of field: ",
stringify!(heif_color_profile_nclx),
"::",
stringify!(color_primary_white_x)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_color_profile_nclx>())).color_primary_white_y as *const _
as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(heif_color_profile_nclx),
"::",
stringify!(color_primary_white_y)
)
);
}
extern "C" {
pub fn heif_image_handle_get_nclx_color_profile(
handle: *const heif_image_handle,
out_data: *mut *mut heif_color_profile_nclx,
) -> heif_error;
}
extern "C" {
pub fn heif_nclx_color_profile_free(nclx_profile: *mut heif_color_profile_nclx);
}
extern "C" {
pub fn heif_image_get_color_profile_type(image: *const heif_image) -> heif_color_profile_type;
}
extern "C" {
pub fn heif_image_get_raw_color_profile_size(image: *const heif_image) -> usize;
}
extern "C" {
pub fn heif_image_get_raw_color_profile(
image: *const heif_image,
out_data: *mut libc::c_void,
) -> heif_error;
}
extern "C" {
pub fn heif_image_get_nclx_color_profile(
image: *const heif_image,
out_data: *mut *mut heif_color_profile_nclx,
) -> heif_error;
}
pub const heif_compression_format_heif_compression_undefined: heif_compression_format = 0;
pub const heif_compression_format_heif_compression_HEVC: heif_compression_format = 1;
pub const heif_compression_format_heif_compression_AVC: heif_compression_format = 2;
pub const heif_compression_format_heif_compression_JPEG: heif_compression_format = 3;
pub const heif_compression_format_heif_compression_AV1: heif_compression_format = 4;
pub type heif_compression_format = libc::c_uint;
pub const heif_chroma_heif_chroma_undefined: heif_chroma = 99;
pub const heif_chroma_heif_chroma_monochrome: heif_chroma = 0;
pub const heif_chroma_heif_chroma_420: heif_chroma = 1;
pub const heif_chroma_heif_chroma_422: heif_chroma = 2;
pub const heif_chroma_heif_chroma_444: heif_chroma = 3;
pub const heif_chroma_heif_chroma_interleaved_RGB: heif_chroma = 10;
pub const heif_chroma_heif_chroma_interleaved_RGBA: heif_chroma = 11;
pub const heif_chroma_heif_chroma_interleaved_RRGGBB_BE: heif_chroma = 12;
pub const heif_chroma_heif_chroma_interleaved_RRGGBBAA_BE: heif_chroma = 13;
pub const heif_chroma_heif_chroma_interleaved_RRGGBB_LE: heif_chroma = 14;
pub const heif_chroma_heif_chroma_interleaved_RRGGBBAA_LE: heif_chroma = 15;
pub type heif_chroma = libc::c_uint;
pub const heif_colorspace_heif_colorspace_undefined: heif_colorspace = 99;
pub const heif_colorspace_heif_colorspace_YCbCr: heif_colorspace = 0;
pub const heif_colorspace_heif_colorspace_RGB: heif_colorspace = 1;
pub const heif_colorspace_heif_colorspace_monochrome: heif_colorspace = 2;
pub type heif_colorspace = libc::c_uint;
pub const heif_channel_heif_channel_Y: heif_channel = 0;
pub const heif_channel_heif_channel_Cb: heif_channel = 1;
pub const heif_channel_heif_channel_Cr: heif_channel = 2;
pub const heif_channel_heif_channel_R: heif_channel = 3;
pub const heif_channel_heif_channel_G: heif_channel = 4;
pub const heif_channel_heif_channel_B: heif_channel = 5;
pub const heif_channel_heif_channel_Alpha: heif_channel = 6;
pub const heif_channel_heif_channel_interleaved: heif_channel = 10;
pub type heif_channel = libc::c_uint;
pub const heif_progress_step_heif_progress_step_total: heif_progress_step = 0;
pub const heif_progress_step_heif_progress_step_load_tile: heif_progress_step = 1;
pub type heif_progress_step = libc::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct heif_decoding_options {
pub version: u8,
pub ignore_transformations: u8,
pub start_progress: ::core::option::Option<
unsafe extern "C" fn(
step: heif_progress_step,
max_progress: libc::c_int,
progress_user_data: *mut libc::c_void,
),
>,
pub on_progress: ::core::option::Option<
unsafe extern "C" fn(
step: heif_progress_step,
progress: libc::c_int,
progress_user_data: *mut libc::c_void,
),
>,
pub end_progress: ::core::option::Option<
unsafe extern "C" fn(step: heif_progress_step, progress_user_data: *mut libc::c_void),
>,
pub progress_user_data: *mut libc::c_void,
pub convert_hdr_to_8bit: u8,
}
#[test]
fn bindgen_test_layout_heif_decoding_options() {
assert_eq!(
::core::mem::size_of::<heif_decoding_options>(),
48usize,
concat!("Size of: ", stringify!(heif_decoding_options))
);
assert_eq!(
::core::mem::align_of::<heif_decoding_options>(),
8usize,
concat!("Alignment of ", stringify!(heif_decoding_options))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<heif_decoding_options>())).version as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(heif_decoding_options),
"::",
stringify!(version)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_decoding_options>())).ignore_transformations as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(heif_decoding_options),
"::",
stringify!(ignore_transformations)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_decoding_options>())).start_progress as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(heif_decoding_options),
"::",
stringify!(start_progress)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_decoding_options>())).on_progress as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(heif_decoding_options),
"::",
stringify!(on_progress)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_decoding_options>())).end_progress as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(heif_decoding_options),
"::",
stringify!(end_progress)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_decoding_options>())).progress_user_data as *const _
as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(heif_decoding_options),
"::",
stringify!(progress_user_data)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_decoding_options>())).convert_hdr_to_8bit as *const _
as usize
},
40usize,
concat!(
"Offset of field: ",
stringify!(heif_decoding_options),
"::",
stringify!(convert_hdr_to_8bit)
)
);
}
extern "C" {
pub fn heif_decoding_options_alloc() -> *mut heif_decoding_options;
}
extern "C" {
pub fn heif_decoding_options_free(arg1: *mut heif_decoding_options);
}
extern "C" {
pub fn heif_decode_image(
in_handle: *const heif_image_handle,
out_img: *mut *mut heif_image,
colorspace: heif_colorspace,
chroma: heif_chroma,
options: *const heif_decoding_options,
) -> heif_error;
}
extern "C" {
pub fn heif_image_get_colorspace(arg1: *const heif_image) -> heif_colorspace;
}
extern "C" {
pub fn heif_image_get_chroma_format(arg1: *const heif_image) -> heif_chroma;
}
extern "C" {
pub fn heif_image_get_width(arg1: *const heif_image, channel: heif_channel) -> libc::c_int;
}
extern "C" {
pub fn heif_image_get_height(arg1: *const heif_image, channel: heif_channel) -> libc::c_int;
}
extern "C" {
pub fn heif_image_get_bits_per_pixel(
arg1: *const heif_image,
channel: heif_channel,
) -> libc::c_int;
}
extern "C" {
pub fn heif_image_get_bits_per_pixel_range(
arg1: *const heif_image,
channel: heif_channel,
) -> libc::c_int;
}
extern "C" {
pub fn heif_image_has_channel(arg1: *const heif_image, channel: heif_channel) -> libc::c_int;
}
extern "C" {
pub fn heif_image_get_plane_readonly(
arg1: *const heif_image,
channel: heif_channel,
out_stride: *mut libc::c_int,
) -> *const u8;
}
extern "C" {
pub fn heif_image_get_plane(
arg1: *mut heif_image,
channel: heif_channel,
out_stride: *mut libc::c_int,
) -> *mut u8;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct heif_scaling_options {
_unused: [u8; 0],
}
extern "C" {
pub fn heif_image_scale_image(
input: *const heif_image,
output: *mut *mut heif_image,
width: libc::c_int,
height: libc::c_int,
options: *const heif_scaling_options,
) -> heif_error;
}
extern "C" {
pub fn heif_image_set_raw_color_profile(
image: *mut heif_image,
profile_type_fourcc_string: *const libc::c_char,
profile_data: *const libc::c_void,
profile_size: usize,
) -> heif_error;
}
extern "C" {
pub fn heif_image_set_nclx_color_profile(
image: *mut heif_image,
color_profile: *const heif_color_profile_nclx,
) -> heif_error;
}
extern "C" {
pub fn heif_image_release(arg1: *const heif_image);
}
extern "C" {
pub fn heif_context_write_to_file(
arg1: *mut heif_context,
filename: *const libc::c_char,
) -> heif_error;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct heif_writer {
pub writer_api_version: libc::c_int,
pub write: ::core::option::Option<
unsafe extern "C" fn(
ctx: *mut heif_context,
data: *const libc::c_void,
size: usize,
userdata: *mut libc::c_void,
) -> heif_error,
>,
}
#[test]
fn bindgen_test_layout_heif_writer() {
assert_eq!(
::core::mem::size_of::<heif_writer>(),
16usize,
concat!("Size of: ", stringify!(heif_writer))
);
assert_eq!(
::core::mem::align_of::<heif_writer>(),
8usize,
concat!("Alignment of ", stringify!(heif_writer))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<heif_writer>())).writer_api_version as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(heif_writer),
"::",
stringify!(writer_api_version)
)
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<heif_writer>())).write as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(heif_writer),
"::",
stringify!(write)
)
);
}
extern "C" {
pub fn heif_context_write(
arg1: *mut heif_context,
writer: *mut heif_writer,
userdata: *mut libc::c_void,
) -> heif_error;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct heif_encoder {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct heif_encoder_descriptor {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct heif_encoder_parameter {
_unused: [u8; 0],
}
extern "C" {
pub fn heif_context_get_encoder_descriptors(
arg1: *mut heif_context,
format_filter: heif_compression_format,
name_filter: *const libc::c_char,
out_encoders: *mut *const heif_encoder_descriptor,
count: libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn heif_encoder_descriptor_get_name(
arg1: *const heif_encoder_descriptor,
) -> *const libc::c_char;
}
extern "C" {
pub fn heif_encoder_descriptor_get_id_name(
arg1: *const heif_encoder_descriptor,
) -> *const libc::c_char;
}
extern "C" {
pub fn heif_encoder_descriptor_get_compression_format(
arg1: *const heif_encoder_descriptor,
) -> heif_compression_format;
}
extern "C" {
pub fn heif_encoder_descriptor_supports_lossy_compression(
arg1: *const heif_encoder_descriptor,
) -> libc::c_int;
}
extern "C" {
pub fn heif_encoder_descriptor_supports_lossless_compression(
arg1: *const heif_encoder_descriptor,
) -> libc::c_int;
}
extern "C" {
pub fn heif_context_get_encoder(
context: *mut heif_context,
arg1: *const heif_encoder_descriptor,
out_encoder: *mut *mut heif_encoder,
) -> heif_error;
}
extern "C" {
pub fn heif_have_decoder_for_format(format: heif_compression_format) -> libc::c_int;
}
extern "C" {
pub fn heif_have_encoder_for_format(format: heif_compression_format) -> libc::c_int;
}
extern "C" {
pub fn heif_context_get_encoder_for_format(
context: *mut heif_context,
format: heif_compression_format,
arg1: *mut *mut heif_encoder,
) -> heif_error;
}
extern "C" {
pub fn heif_encoder_release(arg1: *mut heif_encoder);
}
extern "C" {
pub fn heif_encoder_get_name(arg1: *const heif_encoder) -> *const libc::c_char;
}
extern "C" {
pub fn heif_encoder_set_lossy_quality(
arg1: *mut heif_encoder,
quality: libc::c_int,
) -> heif_error;
}
extern "C" {
pub fn heif_encoder_set_lossless(arg1: *mut heif_encoder, enable: libc::c_int) -> heif_error;
}
extern "C" {
pub fn heif_encoder_set_logging_level(
arg1: *mut heif_encoder,
level: libc::c_int,
) -> heif_error;
}
extern "C" {
pub fn heif_encoder_list_parameters(
arg1: *mut heif_encoder,
) -> *const *const heif_encoder_parameter;
}
extern "C" {
pub fn heif_encoder_parameter_get_name(
arg1: *const heif_encoder_parameter,
) -> *const libc::c_char;
}
pub const heif_encoder_parameter_type_heif_encoder_parameter_type_integer:
heif_encoder_parameter_type = 1;
pub const heif_encoder_parameter_type_heif_encoder_parameter_type_boolean:
heif_encoder_parameter_type = 2;
pub const heif_encoder_parameter_type_heif_encoder_parameter_type_string:
heif_encoder_parameter_type = 3;
pub type heif_encoder_parameter_type = libc::c_uint;
extern "C" {
pub fn heif_encoder_parameter_get_type(
arg1: *const heif_encoder_parameter,
) -> heif_encoder_parameter_type;
}
extern "C" {
pub fn heif_encoder_parameter_get_valid_integer_range(
arg1: *const heif_encoder_parameter,
have_minimum_maximum: *mut libc::c_int,
minimum: *mut libc::c_int,
maximum: *mut libc::c_int,
) -> heif_error;
}
extern "C" {
pub fn heif_encoder_parameter_get_valid_string_values(
arg1: *const heif_encoder_parameter,
out_stringarray: *mut *const *const libc::c_char,
) -> heif_error;
}
extern "C" {
pub fn heif_encoder_set_parameter_integer(
arg1: *mut heif_encoder,
parameter_name: *const libc::c_char,
value: libc::c_int,
) -> heif_error;
}
extern "C" {
pub fn heif_encoder_get_parameter_integer(
arg1: *mut heif_encoder,
parameter_name: *const libc::c_char,
value: *mut libc::c_int,
) -> heif_error;
}
extern "C" {
pub fn heif_encoder_parameter_integer_valid_range(
arg1: *mut heif_encoder,
parameter_name: *const libc::c_char,
have_minimum_maximum: *mut libc::c_int,
minimum: *mut libc::c_int,
maximum: *mut libc::c_int,
) -> heif_error;
}
extern "C" {
pub fn heif_encoder_set_parameter_boolean(
arg1: *mut heif_encoder,
parameter_name: *const libc::c_char,
value: libc::c_int,
) -> heif_error;
}
extern "C" {
pub fn heif_encoder_get_parameter_boolean(
arg1: *mut heif_encoder,
parameter_name: *const libc::c_char,
value: *mut libc::c_int,
) -> heif_error;
}
extern "C" {
pub fn heif_encoder_set_parameter_string(
arg1: *mut heif_encoder,
parameter_name: *const libc::c_char,
value: *const libc::c_char,
) -> heif_error;
}
extern "C" {
pub fn heif_encoder_get_parameter_string(
arg1: *mut heif_encoder,
parameter_name: *const libc::c_char,
value: *mut libc::c_char,
value_size: libc::c_int,
) -> heif_error;
}
extern "C" {
pub fn heif_encoder_parameter_string_valid_values(
arg1: *mut heif_encoder,
parameter_name: *const libc::c_char,
out_stringarray: *mut *const *const libc::c_char,
) -> heif_error;
}
extern "C" {
pub fn heif_encoder_set_parameter(
arg1: *mut heif_encoder,
parameter_name: *const libc::c_char,
value: *const libc::c_char,
) -> heif_error;
}
extern "C" {
pub fn heif_encoder_get_parameter(
arg1: *mut heif_encoder,
parameter_name: *const libc::c_char,
value_ptr: *mut libc::c_char,
value_size: libc::c_int,
) -> heif_error;
}
extern "C" {
pub fn heif_encoder_has_default(
arg1: *mut heif_encoder,
parameter_name: *const libc::c_char,
) -> libc::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct heif_encoding_options {
pub version: u8,
pub save_alpha_channel: u8,
}
#[test]
fn bindgen_test_layout_heif_encoding_options() {
assert_eq!(
::core::mem::size_of::<heif_encoding_options>(),
2usize,
concat!("Size of: ", stringify!(heif_encoding_options))
);
assert_eq!(
::core::mem::align_of::<heif_encoding_options>(),
1usize,
concat!("Alignment of ", stringify!(heif_encoding_options))
);
assert_eq!(
unsafe { &(*(::core::ptr::null::<heif_encoding_options>())).version as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(heif_encoding_options),
"::",
stringify!(version)
)
);
assert_eq!(
unsafe {
&(*(::core::ptr::null::<heif_encoding_options>())).save_alpha_channel as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(heif_encoding_options),
"::",
stringify!(save_alpha_channel)
)
);
}
extern "C" {
pub fn heif_encoding_options_alloc() -> *mut heif_encoding_options;
}
extern "C" {
pub fn heif_encoding_options_free(arg1: *mut heif_encoding_options);
}
extern "C" {
pub fn heif_context_encode_image(
arg1: *mut heif_context,
image: *const heif_image,
encoder: *mut heif_encoder,
options: *const heif_encoding_options,
out_image_handle: *mut *mut heif_image_handle,
) -> heif_error;
}
extern "C" {
pub fn heif_context_set_primary_image(
arg1: *mut heif_context,
image_handle: *mut heif_image_handle,
) -> heif_error;
}
extern "C" {
pub fn heif_context_encode_thumbnail(
arg1: *mut heif_context,
image: *const heif_image,
master_image_handle: *const heif_image_handle,
encoder: *mut heif_encoder,
options: *const heif_encoding_options,
bbox_size: libc::c_int,
out_thumb_image_handle: *mut *mut heif_image_handle,
) -> heif_error;
}
extern "C" {
pub fn heif_context_assign_thumbnail(
arg1: *mut heif_context,
master_image: *const heif_image_handle,
thumbnail_image: *const heif_image_handle,
) -> heif_error;
}
extern "C" {
pub fn heif_context_add_exif_metadata(
arg1: *mut heif_context,
image_handle: *const heif_image_handle,
data: *const libc::c_void,
size: libc::c_int,
) -> heif_error;
}
extern "C" {
pub fn heif_context_add_XMP_metadata(
arg1: *mut heif_context,
image_handle: *const heif_image_handle,
data: *const libc::c_void,
size: libc::c_int,
) -> heif_error;
}
extern "C" {
pub fn heif_context_add_generic_metadata(
ctx: *mut heif_context,
image_handle: *const heif_image_handle,
data: *const libc::c_void,
size: libc::c_int,
item_type: *const libc::c_char,
content_type: *const libc::c_char,
) -> heif_error;
}
extern "C" {
pub fn heif_image_create(
width: libc::c_int,
height: libc::c_int,
colorspace: heif_colorspace,
chroma: heif_chroma,
out_image: *mut *mut heif_image,
) -> heif_error;
}
extern "C" {
pub fn heif_image_add_plane(
image: *mut heif_image,
channel: heif_channel,
width: libc::c_int,
height: libc::c_int,
bit_depth: libc::c_int,
) -> heif_error;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct heif_decoder_plugin {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct heif_encoder_plugin {
_unused: [u8; 0],
}
extern "C" {
pub fn heif_register_decoder(
heif: *mut heif_context,
arg1: *const heif_decoder_plugin,
) -> heif_error;
}
extern "C" {
pub fn heif_register_decoder_plugin(arg1: *const heif_decoder_plugin) -> heif_error;
}
extern "C" {
pub fn heif_register_encoder_plugin(arg1: *const heif_encoder_plugin) -> heif_error;
}
extern "C" {
pub fn heif_encoder_descriptor_supportes_lossy_compression(
arg1: *const heif_encoder_descriptor,
) -> libc::c_int;
}
extern "C" {
pub fn heif_encoder_descriptor_supportes_lossless_compression(
arg1: *const heif_encoder_descriptor,
) -> libc::c_int;
}