libheif
|
#include <stddef.h>
#include <stdint.h>
#include <libheif/heif_version.h>
Go to the source code of this file.
Data Structures | |
struct | heif_error |
struct | heif_init_params |
struct | heif_plugin_info |
struct | heif_reader |
struct | heif_depth_representation_info |
struct | heif_color_profile_nclx |
struct | heif_camera_intrinsic_matrix |
struct | heif_color_conversion_options |
struct | heif_decoding_options |
struct | heif_content_light_level |
struct | heif_mastering_display_colour_volume |
struct | heif_decoded_mastering_display_colour_volume |
struct | heif_writer |
struct | heif_encoding_options |
Macros | |
#define | LIBHEIF_API |
#define | heif_fourcc(a, b, c, d) |
#define | LIBHEIF_MAKE_VERSION(h, m, l) |
#define | LIBHEIF_HAVE_VERSION(h, m, l) |
#define | heif_chroma_interleaved_24bit heif_chroma_interleaved_RGB |
#define | heif_chroma_interleaved_32bit heif_chroma_interleaved_RGBA |
#define | heif_brand2_heic heif_fourcc('h','e','i','c') |
HEVC image (heic ) brand. | |
#define | heif_brand2_heix heif_fourcc('h','e','i','x') |
HEVC image (heix ) brand. | |
#define | heif_brand2_hevc heif_fourcc('h','e','v','c') |
HEVC image sequence (hevc ) brand. | |
#define | heif_brand2_hevx heif_fourcc('h','e','v','x') |
HEVC image sequence (hevx ) brand. | |
#define | heif_brand2_heim heif_fourcc('h','e','i','m') |
HEVC layered image (heim ) brand. | |
#define | heif_brand2_heis heif_fourcc('h','e','i','s') |
HEVC layered image (heis ) brand. | |
#define | heif_brand2_hevm heif_fourcc('h','e','v','m') |
HEVC layered image sequence (hevm ) brand. | |
#define | heif_brand2_hevs heif_fourcc('h','e','v','s') |
HEVC layered image sequence (hevs ) brand. | |
#define | heif_brand2_avif heif_fourcc('a','v','i','f') |
AV1 image (avif ) brand. | |
#define | heif_brand2_avis heif_fourcc('a','v','i','s') |
AV1 image sequence (avis ) brand. | |
#define | heif_brand2_mif1 heif_fourcc('m','i','f','1') |
HEIF image structural brand (mif1 ). | |
#define | heif_brand2_mif2 heif_fourcc('m','i','f','2') |
HEIF image structural brand (mif2 ). | |
#define | heif_brand2_msf1 heif_fourcc('m','s','f','1') |
HEIF image sequence structural brand (msf1 ). | |
#define | heif_brand2_vvic heif_fourcc('v','v','i','c') |
VVC image (vvic ) brand. | |
#define | heif_brand2_vvis heif_fourcc('v','v','i','s') |
VVC image sequence (vvis ) brand. | |
#define | heif_brand2_evbi heif_fourcc('e','v','b','i') |
EVC baseline image (evbi ) brand. | |
#define | heif_brand2_evmi heif_fourcc('e','v','m','i') |
EVC main profile image (evmi ) brand. | |
#define | heif_brand2_evbs heif_fourcc('e','v','b','s') |
EVC baseline image sequence (evbs ) brand. | |
#define | heif_brand2_evms heif_fourcc('e','v','m','s') |
EVC main profile image sequence (evms ) brand. | |
#define | heif_brand2_jpeg heif_fourcc('j','p','e','g') |
JPEG image (jpeg ) brand. | |
#define | heif_brand2_jpgs heif_fourcc('j','p','g','s') |
JPEG image sequence (jpgs ) brand. | |
#define | heif_brand2_j2ki heif_fourcc('j','2','k','i') |
JPEG 2000 image (j2ki ) brand. | |
#define | heif_brand2_j2is heif_fourcc('j','2','i','s') |
JPEG 2000 image sequence (j2is ) brand. | |
#define | heif_brand2_miaf heif_fourcc('m','i','a','f') |
Multi-image application format (MIAF) brand. | |
#define | heif_brand2_1pic heif_fourcc('1','p','i','c') |
Single picture file brand. | |
#define | LIBHEIF_AUX_IMAGE_FILTER_OMIT_ALPHA (1UL<<1) |
#define | LIBHEIF_AUX_IMAGE_FILTER_OMIT_DEPTH (2UL<<1) |
Typedefs | |
typedef uint32_t | heif_item_id |
typedef uint32_t | heif_property_id |
typedef uint32_t | heif_brand2 |
Functions | |
const char * | heif_get_version (void) |
uint32_t | heif_get_version_number (void) |
int | heif_get_version_number_major (void) |
int | heif_get_version_number_minor (void) |
int | heif_get_version_number_maintenance (void) |
struct heif_error | heif_init (struct heif_init_params *) |
Initialise library. | |
void | heif_deinit (void) |
Deinitialise and clean up library. | |
struct heif_error | heif_load_plugin (const char *filename, struct heif_plugin_info const **out_plugin) |
struct heif_error | heif_load_plugins (const char *directory, const struct heif_plugin_info **out_plugins, int *out_nPluginsLoaded, int output_array_size) |
struct heif_error | heif_unload_plugin (const struct heif_plugin_info *plugin) |
const char *const * | heif_get_plugin_directories (void) |
void | heif_free_plugin_directories (const char *const *) |
enum heif_filetype_result | heif_check_filetype (const uint8_t *data, int len) |
struct heif_error | heif_has_compatible_filetype (const uint8_t *data, int len) |
Check the filetype box content for a supported file type. | |
int | heif_check_jpeg_filetype (const uint8_t *data, int len) |
enum heif_brand | heif_main_brand (const uint8_t *data, int len) |
heif_brand2 | heif_read_main_brand (const uint8_t *data, int len) |
heif_brand2 | heif_fourcc_to_brand (const char *brand_fourcc) |
void | heif_brand_to_fourcc (heif_brand2 brand, char *out_fourcc) |
int | heif_has_compatible_brand (const uint8_t *data, int len, const char *brand_fourcc) |
struct heif_error | heif_list_compatible_brands (const uint8_t *data, int len, heif_brand2 **out_brands, int *out_size) |
void | heif_free_list_of_compatible_brands (heif_brand2 *brands_list) |
const char * | heif_get_file_mime_type (const uint8_t *data, int len) |
struct heif_context * | heif_context_alloc (void) |
void | heif_context_free (struct heif_context *) |
struct heif_error | heif_context_read_from_file (struct heif_context *, const char *filename, const struct heif_reading_options *) |
struct heif_error | heif_context_read_from_memory (struct heif_context *, const void *mem, size_t size, const struct heif_reading_options *) |
struct heif_error | heif_context_read_from_memory_without_copy (struct heif_context *, const void *mem, size_t size, const struct heif_reading_options *) |
struct heif_error | heif_context_read_from_reader (struct heif_context *, const struct heif_reader *reader, void *userdata, const struct heif_reading_options *) |
int | heif_context_get_number_of_top_level_images (struct heif_context *ctx) |
int | heif_context_is_top_level_image_ID (struct heif_context *ctx, heif_item_id id) |
int | heif_context_get_list_of_top_level_image_IDs (struct heif_context *ctx, heif_item_id *ID_array, int count) |
struct heif_error | heif_context_get_primary_image_ID (struct heif_context *ctx, heif_item_id *id) |
struct heif_error | heif_context_get_primary_image_handle (struct heif_context *ctx, struct heif_image_handle **) |
struct heif_error | heif_context_get_image_handle (struct heif_context *ctx, heif_item_id id, struct heif_image_handle **) |
void | heif_context_debug_dump_boxes_to_file (struct heif_context *ctx, int fd) |
void | heif_context_set_maximum_image_size_limit (struct heif_context *ctx, int maximum_width) |
void | heif_context_set_max_decoding_threads (struct heif_context *ctx, int max_threads) |
void | heif_image_handle_release (const struct heif_image_handle *) |
int | heif_image_handle_is_primary_image (const struct heif_image_handle *handle) |
heif_item_id | heif_image_handle_get_item_id (const struct heif_image_handle *handle) |
int | heif_image_handle_get_width (const struct heif_image_handle *handle) |
int | heif_image_handle_get_height (const struct heif_image_handle *handle) |
int | heif_image_handle_has_alpha_channel (const struct heif_image_handle *) |
int | heif_image_handle_is_premultiplied_alpha (const struct heif_image_handle *) |
int | heif_image_handle_get_luma_bits_per_pixel (const struct heif_image_handle *) |
int | heif_image_handle_get_chroma_bits_per_pixel (const struct heif_image_handle *) |
struct heif_error | heif_image_handle_get_preferred_decoding_colorspace (const struct heif_image_handle *image_handle, enum heif_colorspace *out_colorspace, enum heif_chroma *out_chroma) |
int | heif_image_handle_get_ispe_width (const struct heif_image_handle *handle) |
int | heif_image_handle_get_ispe_height (const struct heif_image_handle *handle) |
struct heif_context * | heif_image_handle_get_context (const struct heif_image_handle *handle) |
int | heif_image_handle_has_depth_image (const struct heif_image_handle *) |
int | heif_image_handle_get_number_of_depth_images (const struct heif_image_handle *handle) |
int | heif_image_handle_get_list_of_depth_image_IDs (const struct heif_image_handle *handle, heif_item_id *ids, int count) |
struct heif_error | heif_image_handle_get_depth_image_handle (const struct heif_image_handle *handle, heif_item_id depth_image_id, struct heif_image_handle **out_depth_handle) |
void | heif_depth_representation_info_free (const struct heif_depth_representation_info *info) |
int | heif_image_handle_get_depth_image_representation_info (const struct heif_image_handle *handle, heif_item_id depth_image_id, const struct heif_depth_representation_info **out) |
int | heif_image_handle_get_number_of_thumbnails (const struct heif_image_handle *handle) |
int | heif_image_handle_get_list_of_thumbnail_IDs (const struct heif_image_handle *handle, heif_item_id *ids, int count) |
struct heif_error | heif_image_handle_get_thumbnail (const struct heif_image_handle *main_image_handle, heif_item_id thumbnail_id, struct heif_image_handle **out_thumbnail_handle) |
int | heif_image_handle_get_number_of_auxiliary_images (const struct heif_image_handle *handle, int aux_filter) |
int | heif_image_handle_get_list_of_auxiliary_image_IDs (const struct heif_image_handle *handle, int aux_filter, heif_item_id *ids, int count) |
struct heif_error | heif_image_handle_get_auxiliary_type (const struct heif_image_handle *handle, const char **out_type) |
void | heif_image_handle_release_auxiliary_type (const struct heif_image_handle *handle, const char **out_type) |
void | heif_image_handle_free_auxiliary_types (const struct heif_image_handle *handle, const char **out_type) |
struct heif_error | heif_image_handle_get_auxiliary_image_handle (const struct heif_image_handle *main_image_handle, heif_item_id auxiliary_id, struct heif_image_handle **out_auxiliary_handle) |
int | heif_image_handle_get_number_of_metadata_blocks (const struct heif_image_handle *handle, const char *type_filter) |
int | heif_image_handle_get_list_of_metadata_block_IDs (const struct heif_image_handle *handle, const char *type_filter, heif_item_id *ids, int count) |
const char * | heif_image_handle_get_metadata_type (const struct heif_image_handle *handle, heif_item_id metadata_id) |
const char * | heif_image_handle_get_metadata_content_type (const struct heif_image_handle *handle, heif_item_id metadata_id) |
size_t | heif_image_handle_get_metadata_size (const struct heif_image_handle *handle, heif_item_id metadata_id) |
struct heif_error | heif_image_handle_get_metadata (const struct heif_image_handle *handle, heif_item_id metadata_id, void *out_data) |
const char * | heif_image_handle_get_metadata_item_uri_type (const struct heif_image_handle *handle, heif_item_id metadata_id) |
enum heif_color_profile_type | heif_image_handle_get_color_profile_type (const struct heif_image_handle *handle) |
size_t | heif_image_handle_get_raw_color_profile_size (const struct heif_image_handle *handle) |
struct heif_error | heif_image_handle_get_raw_color_profile (const struct heif_image_handle *handle, void *out_data) |
struct heif_error | heif_nclx_color_profile_set_color_primaries (struct heif_color_profile_nclx *nclx, uint16_t cp) |
struct heif_error | heif_nclx_color_profile_set_transfer_characteristics (struct heif_color_profile_nclx *nclx, uint16_t transfer_characteristics) |
struct heif_error | heif_nclx_color_profile_set_matrix_coefficients (struct heif_color_profile_nclx *nclx, uint16_t matrix_coefficients) |
struct heif_error | heif_image_handle_get_nclx_color_profile (const struct heif_image_handle *handle, struct heif_color_profile_nclx **out_data) |
struct heif_color_profile_nclx * | heif_nclx_color_profile_alloc (void) |
void | heif_nclx_color_profile_free (struct heif_color_profile_nclx *nclx_profile) |
enum heif_color_profile_type | heif_image_get_color_profile_type (const struct heif_image *image) |
size_t | heif_image_get_raw_color_profile_size (const struct heif_image *image) |
struct heif_error | heif_image_get_raw_color_profile (const struct heif_image *image, void *out_data) |
struct heif_error | heif_image_get_nclx_color_profile (const struct heif_image *image, struct heif_color_profile_nclx **out_data) |
int | heif_image_handle_has_camera_intrinsic_matrix (const struct heif_image_handle *handle) |
struct heif_error | heif_image_handle_get_camera_intrinsic_matrix (const struct heif_image_handle *handle, struct heif_camera_intrinsic_matrix *out_matrix) |
int | heif_image_handle_has_camera_extrinsic_matrix (const struct heif_image_handle *handle) |
struct heif_error | heif_image_handle_get_camera_extrinsic_matrix (const struct heif_image_handle *handle, struct heif_camera_extrinsic_matrix **out_matrix) |
void | heif_camera_extrinsic_matrix_release (struct heif_camera_extrinsic_matrix *) |
struct heif_error | heif_camera_extrinsic_matrix_get_rotation_matrix (const struct heif_camera_extrinsic_matrix *, double *out_matrix_row_major) |
struct heif_decoding_options * | heif_decoding_options_alloc (void) |
void | heif_decoding_options_free (struct heif_decoding_options *) |
struct heif_error | heif_decode_image (const struct heif_image_handle *in_handle, struct heif_image **out_img, enum heif_colorspace colorspace, enum heif_chroma chroma, const struct heif_decoding_options *options) |
enum heif_colorspace | heif_image_get_colorspace (const struct heif_image *) |
enum heif_chroma | heif_image_get_chroma_format (const struct heif_image *) |
int | heif_image_get_width (const struct heif_image *img, enum heif_channel channel) |
Get the width of a specified image channel. | |
int | heif_image_get_height (const struct heif_image *img, enum heif_channel channel) |
Get the height of a specified image channel. | |
int | heif_image_get_primary_width (const struct heif_image *img) |
Get the width of the main channel. | |
int | heif_image_get_primary_height (const struct heif_image *img) |
Get the height of the main channel. | |
struct heif_error | heif_image_crop (struct heif_image *img, int left, int right, int top, int bottom) |
int | heif_image_get_bits_per_pixel (const struct heif_image *, enum heif_channel channel) |
int | heif_image_get_bits_per_pixel_range (const struct heif_image *, enum heif_channel channel) |
int | heif_image_has_channel (const struct heif_image *, enum heif_channel channel) |
const uint8_t * | heif_image_get_plane_readonly (const struct heif_image *, enum heif_channel channel, int *out_stride) |
uint8_t * | heif_image_get_plane (struct heif_image *, enum heif_channel channel, int *out_stride) |
struct heif_error | heif_image_scale_image (const struct heif_image *input, struct heif_image **output, int width, int height, const struct heif_scaling_options *options) |
struct heif_error | heif_image_set_raw_color_profile (struct heif_image *image, const char *profile_type_fourcc_string, const void *profile_data, const size_t profile_size) |
struct heif_error | heif_image_set_nclx_color_profile (struct heif_image *image, const struct heif_color_profile_nclx *color_profile) |
int | heif_image_get_decoding_warnings (struct heif_image *image, int first_warning_idx, struct heif_error *out_warnings, int max_output_buffer_entries) |
void | heif_image_add_decoding_warning (struct heif_image *image, struct heif_error err) |
void | heif_image_release (const struct heif_image *) |
int | heif_image_has_content_light_level (const struct heif_image *) |
void | heif_image_get_content_light_level (const struct heif_image *, struct heif_content_light_level *out) |
void | heif_image_set_content_light_level (const struct heif_image *, const struct heif_content_light_level *in) |
int | heif_image_has_mastering_display_colour_volume (const struct heif_image *) |
void | heif_image_get_mastering_display_colour_volume (const struct heif_image *, struct heif_mastering_display_colour_volume *out) |
void | heif_image_set_mastering_display_colour_volume (const struct heif_image *, const struct heif_mastering_display_colour_volume *in) |
struct heif_error | heif_mastering_display_colour_volume_decode (const struct heif_mastering_display_colour_volume *in, struct heif_decoded_mastering_display_colour_volume *out) |
void | heif_image_get_pixel_aspect_ratio (const struct heif_image *, uint32_t *aspect_h, uint32_t *aspect_v) |
void | heif_image_set_pixel_aspect_ratio (struct heif_image *, uint32_t aspect_h, uint32_t aspect_v) |
struct heif_error | heif_context_write_to_file (struct heif_context *, const char *filename) |
struct heif_error | heif_context_write (struct heif_context *, struct heif_writer *writer, void *userdata) |
void | heif_context_add_compatible_brand (struct heif_context *ctx, heif_brand2 compatible_brand) |
int | heif_get_decoder_descriptors (enum heif_compression_format format_filter, const struct heif_decoder_descriptor **out_decoders, int count) |
const char * | heif_decoder_descriptor_get_name (const struct heif_decoder_descriptor *) |
const char * | heif_decoder_descriptor_get_id_name (const struct heif_decoder_descriptor *) |
int | heif_context_get_encoder_descriptors (struct heif_context *, enum heif_compression_format format_filter, const char *name_filter, const struct heif_encoder_descriptor **out_encoders, int count) |
int | heif_get_encoder_descriptors (enum heif_compression_format format_filter, const char *name_filter, const struct heif_encoder_descriptor **out_encoders, int count) |
const char * | heif_encoder_descriptor_get_name (const struct heif_encoder_descriptor *) |
const char * | heif_encoder_descriptor_get_id_name (const struct heif_encoder_descriptor *) |
enum heif_compression_format | heif_encoder_descriptor_get_compression_format (const struct heif_encoder_descriptor *) |
int | heif_encoder_descriptor_supports_lossy_compression (const struct heif_encoder_descriptor *) |
int | heif_encoder_descriptor_supports_lossless_compression (const struct heif_encoder_descriptor *) |
struct heif_error | heif_context_get_encoder (struct heif_context *context, const struct heif_encoder_descriptor *, struct heif_encoder **out_encoder) |
int | heif_have_decoder_for_format (enum heif_compression_format format) |
int | heif_have_encoder_for_format (enum heif_compression_format format) |
struct heif_error | heif_context_get_encoder_for_format (struct heif_context *context, enum heif_compression_format format, struct heif_encoder **) |
void | heif_encoder_release (struct heif_encoder *) |
const char * | heif_encoder_get_name (const struct heif_encoder *) |
struct heif_error | heif_encoder_set_lossy_quality (struct heif_encoder *, int quality) |
struct heif_error | heif_encoder_set_lossless (struct heif_encoder *, int enable) |
struct heif_error | heif_encoder_set_logging_level (struct heif_encoder *, int level) |
const struct heif_encoder_parameter *const * | heif_encoder_list_parameters (struct heif_encoder *) |
const char * | heif_encoder_parameter_get_name (const struct heif_encoder_parameter *) |
enum heif_encoder_parameter_type | heif_encoder_parameter_get_type (const struct heif_encoder_parameter *) |
struct heif_error | heif_encoder_parameter_get_valid_integer_range (const struct heif_encoder_parameter *, int *have_minimum_maximum, int *minimum, int *maximum) |
struct heif_error | heif_encoder_parameter_get_valid_integer_values (const struct heif_encoder_parameter *, int *have_minimum, int *have_maximum, int *minimum, int *maximum, int *num_valid_values, const int **out_integer_array) |
struct heif_error | heif_encoder_parameter_get_valid_string_values (const struct heif_encoder_parameter *, const char *const **out_stringarray) |
struct heif_error | heif_encoder_set_parameter_integer (struct heif_encoder *, const char *parameter_name, int value) |
struct heif_error | heif_encoder_get_parameter_integer (struct heif_encoder *, const char *parameter_name, int *value) |
struct heif_error | heif_encoder_parameter_integer_valid_range (struct heif_encoder *, const char *parameter_name, int *have_minimum_maximum, int *minimum, int *maximum) |
struct heif_error | heif_encoder_set_parameter_boolean (struct heif_encoder *, const char *parameter_name, int value) |
struct heif_error | heif_encoder_get_parameter_boolean (struct heif_encoder *, const char *parameter_name, int *value) |
struct heif_error | heif_encoder_set_parameter_string (struct heif_encoder *, const char *parameter_name, const char *value) |
struct heif_error | heif_encoder_get_parameter_string (struct heif_encoder *, const char *parameter_name, char *value, int value_size) |
struct heif_error | heif_encoder_parameter_string_valid_values (struct heif_encoder *, const char *parameter_name, const char *const **out_stringarray) |
struct heif_error | heif_encoder_parameter_integer_valid_values (struct heif_encoder *, const char *parameter_name, int *have_minimum, int *have_maximum, int *minimum, int *maximum, int *num_valid_values, const int **out_integer_array) |
struct heif_error | heif_encoder_set_parameter (struct heif_encoder *, const char *parameter_name, const char *value) |
struct heif_error | heif_encoder_get_parameter (struct heif_encoder *, const char *parameter_name, char *value_ptr, int value_size) |
int | heif_encoder_has_default (struct heif_encoder *, const char *parameter_name) |
struct heif_encoding_options * | heif_encoding_options_alloc (void) |
void | heif_encoding_options_free (struct heif_encoding_options *) |
struct heif_error | heif_context_encode_image (struct heif_context *, const struct heif_image *image, struct heif_encoder *encoder, const struct heif_encoding_options *options, struct heif_image_handle **out_image_handle) |
struct heif_error | heif_context_encode_grid (struct heif_context *ctx, struct heif_image **tiles, uint16_t rows, uint16_t columns, struct heif_encoder *encoder, const struct heif_encoding_options *input_options, struct heif_image_handle **out_image_handle) |
Encodes an array of images into a grid. | |
struct heif_error | heif_context_set_primary_image (struct heif_context *, struct heif_image_handle *image_handle) |
struct heif_error | heif_context_encode_thumbnail (struct heif_context *, const struct heif_image *image, const struct heif_image_handle *master_image_handle, struct heif_encoder *encoder, const struct heif_encoding_options *options, int bbox_size, struct heif_image_handle **out_thumb_image_handle) |
struct heif_error | heif_context_assign_thumbnail (struct heif_context *, const struct heif_image_handle *master_image, const struct heif_image_handle *thumbnail_image) |
struct heif_error | heif_context_add_exif_metadata (struct heif_context *, const struct heif_image_handle *image_handle, const void *data, int size) |
struct heif_error | heif_context_add_XMP_metadata (struct heif_context *, const struct heif_image_handle *image_handle, const void *data, int size) |
struct heif_error | heif_context_add_XMP_metadata2 (struct heif_context *, const struct heif_image_handle *image_handle, const void *data, int size, enum heif_metadata_compression compression) |
struct heif_error | heif_context_add_generic_metadata (struct heif_context *ctx, const struct heif_image_handle *image_handle, const void *data, int size, const char *item_type, const char *content_type) |
struct heif_error | heif_context_add_generic_uri_metadata (struct heif_context *ctx, const struct heif_image_handle *image_handle, const void *data, int size, const char *item_uri_type, heif_item_id *out_item_id) |
struct heif_error | heif_image_create (int width, int height, enum heif_colorspace colorspace, enum heif_chroma chroma, struct heif_image **out_image) |
Create a new image of the specified resolution and colorspace. | |
struct heif_error | heif_image_add_plane (struct heif_image *image, enum heif_channel channel, int width, int height, int bit_depth) |
Add an image plane to the image. | |
void | heif_image_set_premultiplied_alpha (struct heif_image *image, int is_premultiplied_alpha) |
int | heif_image_is_premultiplied_alpha (struct heif_image *image) |
struct heif_error | heif_image_extend_padding_to_size (struct heif_image *image, int min_physical_width, int min_physical_height) |
struct heif_error | heif_register_decoder (struct heif_context *heif, const struct heif_decoder_plugin *) |
struct heif_error | heif_register_decoder_plugin (const struct heif_decoder_plugin *) |
struct heif_error | heif_register_encoder_plugin (const struct heif_encoder_plugin *) |
int | heif_encoder_descriptor_supportes_lossy_compression (const struct heif_encoder_descriptor *) |
int | heif_encoder_descriptor_supportes_lossless_compression (const struct heif_encoder_descriptor *) |
Variables | |
const struct heif_error | heif_error_success |
Public API for libheif.
#define heif_brand2_1pic heif_fourcc('1','p','i','c') |
Single picture file brand.
This is a compatible brand indicating the file contains a single intra-coded picture.
See ISO/IEC 23008-12:2022 Section 10.2.5.
#define heif_brand2_avif heif_fourcc('a','v','i','f') |
AV1 image (avif
) brand.
See https://aomediacodec.github.io/av1-avif/#image-and-image-collection-brand
#define heif_brand2_avis heif_fourcc('a','v','i','s') |
AV1 image sequence (avis
) brand.
See https://aomediacodec.github.io/av1-avif/#image-sequence-brand
#define heif_brand2_evbi heif_fourcc('e','v','b','i') |
EVC baseline image (evbi
) brand.
See ISO/IEC 23008-12:2022 Section M.4.1.
#define heif_brand2_evbs heif_fourcc('e','v','b','s') |
EVC baseline image sequence (evbs
) brand.
See ISO/IEC 23008-12:2022 Section M.4.3.
#define heif_brand2_evmi heif_fourcc('e','v','m','i') |
EVC main profile image (evmi
) brand.
See ISO/IEC 23008-12:2022 Section M.4.2.
#define heif_brand2_evms heif_fourcc('e','v','m','s') |
EVC main profile image sequence (evms
) brand.
See ISO/IEC 23008-12:2022 Section M.4.4.
#define heif_brand2_heic heif_fourcc('h','e','i','c') |
HEVC image (heic
) brand.
Image conforms to HEVC (H.265) Main or Main Still profile.
See ISO/IEC 23008-12:2022 Section B.4.1.
#define heif_brand2_heim heif_fourcc('h','e','i','m') |
HEVC layered image (heim
) brand.
Image layers conform to HEVC (H.265) Main or Multiview Main profile.
See ISO/IEC 23008-12:2022 Section B.4.3.
#define heif_brand2_heis heif_fourcc('h','e','i','s') |
HEVC layered image (heis
) brand.
Image layers conform to HEVC (H.265) Main, Main 10, Scalable Main or Scalable Main 10 profile.
See ISO/IEC 23008-12:2022 Section B.4.3.
#define heif_brand2_heix heif_fourcc('h','e','i','x') |
HEVC image (heix
) brand.
Image conforms to HEVC (H.265) Main 10 profile.
See ISO/IEC 23008-12:2022 Section B.4.1.
#define heif_brand2_hevc heif_fourcc('h','e','v','c') |
HEVC image sequence (hevc
) brand.
Image sequence conforms to HEVC (H.265) Main profile.
See ISO/IEC 23008-12:2022 Section B.4.2.
#define heif_brand2_hevm heif_fourcc('h','e','v','m') |
HEVC layered image sequence (hevm
) brand.
Image sequence layers conform to HEVC (H.265) Main or Multiview Main profile.
See ISO/IEC 23008-12:2022 Section B.4.4.
#define heif_brand2_hevs heif_fourcc('h','e','v','s') |
HEVC layered image sequence (hevs
) brand.
Image sequence layers conform to HEVC (H.265) Main, Main 10, Scalable Main or Scalable Main 10 profile.
See ISO/IEC 23008-12:2022 Section B.4.4.
#define heif_brand2_hevx heif_fourcc('h','e','v','x') |
HEVC image sequence (hevx
) brand.
Image sequence conforms to HEVC (H.265) Main 10 profile.
See ISO/IEC 23008-12:2022 Section B.4.2.
#define heif_brand2_j2is heif_fourcc('j','2','i','s') |
JPEG 2000 image sequence (j2is
) brand.
See ISO/IEC 15444-16:2021 Section 7.6
#define heif_brand2_j2ki heif_fourcc('j','2','k','i') |
JPEG 2000 image (j2ki
) brand.
See ISO/IEC 15444-16:2021 Section 6.5
#define heif_brand2_jpeg heif_fourcc('j','p','e','g') |
JPEG image (jpeg
) brand.
See ISO/IEC 23008-12:2022 Annex H.4
#define heif_brand2_jpgs heif_fourcc('j','p','g','s') |
JPEG image sequence (jpgs
) brand.
See ISO/IEC 23008-12:2022 Annex H.5
#define heif_brand2_miaf heif_fourcc('m','i','a','f') |
Multi-image application format (MIAF) brand.
This is HEIF with additional constraints for interoperability.
See ISO/IEC 23000-22.
#define heif_brand2_mif1 heif_fourcc('m','i','f','1') |
HEIF image structural brand (mif1
).
This does not imply a specific coding algorithm.
See ISO/IEC 23008-12:2022 Section 10.2.2.
#define heif_brand2_mif2 heif_fourcc('m','i','f','2') |
HEIF image structural brand (mif2
).
This does not imply a specific coding algorithm. mif2
extends the requirements of mif1
to include the rref
and iscl
item properties.
See ISO/IEC 23008-12:2022 Section 10.2.3.
#define heif_brand2_msf1 heif_fourcc('m','s','f','1') |
HEIF image sequence structural brand (msf1
).
This does not imply a specific coding algorithm.
See ISO/IEC 23008-12:2022 Section 10.3.1.
#define heif_brand2_vvic heif_fourcc('v','v','i','c') |
VVC image (vvic
) brand.
See ISO/IEC 23008-12:2022 Section L.4.1.
#define heif_brand2_vvis heif_fourcc('v','v','i','s') |
VVC image sequence (vvis
) brand.
See ISO/IEC 23008-12:2022 Section L.4.2.
#define heif_chroma_interleaved_24bit heif_chroma_interleaved_RGB |
#define heif_chroma_interleaved_32bit heif_chroma_interleaved_RGBA |
#define heif_fourcc | ( | a, | |
b, | |||
c, | |||
d ) |
#define LIBHEIF_API |
#define LIBHEIF_AUX_IMAGE_FILTER_OMIT_ALPHA (1UL<<1) |
#define LIBHEIF_AUX_IMAGE_FILTER_OMIT_DEPTH (2UL<<1) |
#define LIBHEIF_HAVE_VERSION | ( | h, | |
m, | |||
l ) |
#define LIBHEIF_MAKE_VERSION | ( | h, | |
m, | |||
l ) |
typedef uint32_t heif_brand2 |
typedef uint32_t heif_item_id |
typedef uint32_t heif_property_id |
enum heif_brand |
enum heif_channel |
enum heif_chroma |
enum heif_color_primaries |
enum heif_colorspace |
libheif known compression formats.
Enumerator | |
---|---|
heif_compression_undefined | Unspecified / undefined compression format. This is used to mean "no match" or "any decoder" for some parts of the API. It does not indicate a specific compression format. |
heif_compression_HEVC | HEVC compression, used for HEIC images. This is equivalent to H.265. |
heif_compression_AVC | AVC compression. (Currently unused in libheif.) The compression is defined in ISO/IEC 14496-10. This is equivalent to H.264. The encapsulation is defined in ISO/IEC 23008-12:2022 Annex E. |
heif_compression_JPEG | JPEG compression. The compression format is defined in ISO/IEC 10918-1. The encapsulation of JPEG is specified in ISO/IEC 23008-12:2022 Annex H. |
heif_compression_AV1 | AV1 compression, used for AVIF images. The compression format is provided at https://aomediacodec.github.io/av1-spec/ The encapsulation is defined in https://aomediacodec.github.io/av1-avif/ |
heif_compression_VVC | VVC compression. (Currently unused in libheif.) The compression format is defined in ISO/IEC 23090-3. This is equivalent to H.266. The encapsulation is defined in ISO/IEC 23008-12:2022 Annex L. |
heif_compression_EVC | EVC compression. (Currently unused in libheif.) The compression format is defined in ISO/IEC 23094-1. This is equivalent to H.266. The encapsulation is defined in ISO/IEC 23008-12:2022 Annex M. |
heif_compression_JPEG2000 | JPEG 2000 compression. The encapsulation of JPEG 2000 is specified in ISO/IEC 15444-16:2021. The core encoding is defined in ISO/IEC 15444-1, or ITU-T T.800. |
heif_compression_uncompressed | Uncompressed encoding. This is defined in ISO/IEC 23001-17:2023 (Final Draft International Standard). |
heif_compression_mask | Mask image encoding. See ISO/IEC 23008-12:2022 Section 6.10.2 |
heif_compression_HTJ2K | High Throughput JPEG 2000 (HT-J2K) compression. The encapsulation of HT-J2K is specified in ISO/IEC 15444-16:2021. The core encoding is defined in ISO/IEC 15444-15, or ITU-T T.814. |
enum heif_error_code |
enum heif_filetype_result |
enum heif_orientation |
enum heif_plugin_type |
enum heif_progress_step |
enum heif_suberror_code |
void heif_brand_to_fourcc | ( | heif_brand2 | brand, |
char * | out_fourcc ) |
struct heif_error heif_camera_extrinsic_matrix_get_rotation_matrix | ( | const struct heif_camera_extrinsic_matrix * | , |
double * | out_matrix_row_major ) |
void heif_camera_extrinsic_matrix_release | ( | struct heif_camera_extrinsic_matrix * | ) |
enum heif_filetype_result heif_check_filetype | ( | const uint8_t * | data, |
int | len ) |
int heif_check_jpeg_filetype | ( | const uint8_t * | data, |
int | len ) |
void heif_context_add_compatible_brand | ( | struct heif_context * | ctx, |
heif_brand2 | compatible_brand ) |
struct heif_error heif_context_add_exif_metadata | ( | struct heif_context * | , |
const struct heif_image_handle * | image_handle, | ||
const void * | data, | ||
int | size ) |
struct heif_error heif_context_add_generic_metadata | ( | struct heif_context * | ctx, |
const struct heif_image_handle * | image_handle, | ||
const void * | data, | ||
int | size, | ||
const char * | item_type, | ||
const char * | content_type ) |
struct heif_error heif_context_add_generic_uri_metadata | ( | struct heif_context * | ctx, |
const struct heif_image_handle * | image_handle, | ||
const void * | data, | ||
int | size, | ||
const char * | item_uri_type, | ||
heif_item_id * | out_item_id ) |
struct heif_error heif_context_add_XMP_metadata | ( | struct heif_context * | , |
const struct heif_image_handle * | image_handle, | ||
const void * | data, | ||
int | size ) |
struct heif_error heif_context_add_XMP_metadata2 | ( | struct heif_context * | , |
const struct heif_image_handle * | image_handle, | ||
const void * | data, | ||
int | size, | ||
enum heif_metadata_compression | compression ) |
struct heif_context * heif_context_alloc | ( | void | ) |
struct heif_error heif_context_assign_thumbnail | ( | struct heif_context * | , |
const struct heif_image_handle * | master_image, | ||
const struct heif_image_handle * | thumbnail_image ) |
void heif_context_debug_dump_boxes_to_file | ( | struct heif_context * | ctx, |
int | fd ) |
struct heif_error heif_context_encode_grid | ( | struct heif_context * | ctx, |
struct heif_image ** | tiles, | ||
uint16_t | rows, | ||
uint16_t | columns, | ||
struct heif_encoder * | encoder, | ||
const struct heif_encoding_options * | input_options, | ||
struct heif_image_handle ** | out_image_handle ) |
Encodes an array of images into a grid.
ctx | The file context |
tiles | User allocated array of images that will form the grid. |
rows | The number of rows in the grid. |
columns | The number of columns in the grid. |
encoder | Defines the encoder to use. See heif_context_get_encoder_for_format() |
input_options | Optional, may be nullptr. |
out_image_handle | Returns a handle to the grid. The caller is responsible for freeing it. |
struct heif_error heif_context_encode_image | ( | struct heif_context * | , |
const struct heif_image * | image, | ||
struct heif_encoder * | encoder, | ||
const struct heif_encoding_options * | options, | ||
struct heif_image_handle ** | out_image_handle ) |
struct heif_error heif_context_encode_thumbnail | ( | struct heif_context * | , |
const struct heif_image * | image, | ||
const struct heif_image_handle * | master_image_handle, | ||
struct heif_encoder * | encoder, | ||
const struct heif_encoding_options * | options, | ||
int | bbox_size, | ||
struct heif_image_handle ** | out_thumb_image_handle ) |
void heif_context_free | ( | struct heif_context * | ) |
struct heif_error heif_context_get_encoder | ( | struct heif_context * | context, |
const struct heif_encoder_descriptor * | , | ||
struct heif_encoder ** | out_encoder ) |
int heif_context_get_encoder_descriptors | ( | struct heif_context * | , |
enum heif_compression_format | format_filter, | ||
const char * | name_filter, | ||
const struct heif_encoder_descriptor ** | out_encoders, | ||
int | count ) |
struct heif_error heif_context_get_encoder_for_format | ( | struct heif_context * | context, |
enum heif_compression_format | format, | ||
struct heif_encoder ** | ) |
struct heif_error heif_context_get_image_handle | ( | struct heif_context * | ctx, |
heif_item_id | id, | ||
struct heif_image_handle ** | ) |
int heif_context_get_list_of_top_level_image_IDs | ( | struct heif_context * | ctx, |
heif_item_id * | ID_array, | ||
int | count ) |
int heif_context_get_number_of_top_level_images | ( | struct heif_context * | ctx | ) |
struct heif_error heif_context_get_primary_image_handle | ( | struct heif_context * | ctx, |
struct heif_image_handle ** | ) |
struct heif_error heif_context_get_primary_image_ID | ( | struct heif_context * | ctx, |
heif_item_id * | id ) |
int heif_context_is_top_level_image_ID | ( | struct heif_context * | ctx, |
heif_item_id | id ) |
struct heif_error heif_context_read_from_file | ( | struct heif_context * | , |
const char * | filename, | ||
const struct heif_reading_options * | ) |
struct heif_error heif_context_read_from_memory | ( | struct heif_context * | , |
const void * | mem, | ||
size_t | size, | ||
const struct heif_reading_options * | ) |
struct heif_error heif_context_read_from_memory_without_copy | ( | struct heif_context * | , |
const void * | mem, | ||
size_t | size, | ||
const struct heif_reading_options * | ) |
struct heif_error heif_context_read_from_reader | ( | struct heif_context * | , |
const struct heif_reader * | reader, | ||
void * | userdata, | ||
const struct heif_reading_options * | ) |
void heif_context_set_max_decoding_threads | ( | struct heif_context * | ctx, |
int | max_threads ) |
void heif_context_set_maximum_image_size_limit | ( | struct heif_context * | ctx, |
int | maximum_width ) |
struct heif_error heif_context_set_primary_image | ( | struct heif_context * | , |
struct heif_image_handle * | image_handle ) |
struct heif_error heif_context_write | ( | struct heif_context * | , |
struct heif_writer * | writer, | ||
void * | userdata ) |
struct heif_error heif_context_write_to_file | ( | struct heif_context * | , |
const char * | filename ) |
struct heif_error heif_decode_image | ( | const struct heif_image_handle * | in_handle, |
struct heif_image ** | out_img, | ||
enum heif_colorspace | colorspace, | ||
enum heif_chroma | chroma, | ||
const struct heif_decoding_options * | options ) |
const char * heif_decoder_descriptor_get_id_name | ( | const struct heif_decoder_descriptor * | ) |
const char * heif_decoder_descriptor_get_name | ( | const struct heif_decoder_descriptor * | ) |
struct heif_decoding_options * heif_decoding_options_alloc | ( | void | ) |
void heif_decoding_options_free | ( | struct heif_decoding_options * | ) |
void heif_deinit | ( | void | ) |
Deinitialise and clean up library.
You should call heif_init() when you start using libheif and heif_deinit() when you are finished. These calls are reference counted. Each call to heif_init() should be matched by one call to heif_deinit().
void heif_depth_representation_info_free | ( | const struct heif_depth_representation_info * | info | ) |
enum heif_compression_format heif_encoder_descriptor_get_compression_format | ( | const struct heif_encoder_descriptor * | ) |
const char * heif_encoder_descriptor_get_id_name | ( | const struct heif_encoder_descriptor * | ) |
const char * heif_encoder_descriptor_get_name | ( | const struct heif_encoder_descriptor * | ) |
int heif_encoder_descriptor_supportes_lossless_compression | ( | const struct heif_encoder_descriptor * | ) |
int heif_encoder_descriptor_supportes_lossy_compression | ( | const struct heif_encoder_descriptor * | ) |
int heif_encoder_descriptor_supports_lossless_compression | ( | const struct heif_encoder_descriptor * | ) |
int heif_encoder_descriptor_supports_lossy_compression | ( | const struct heif_encoder_descriptor * | ) |
const char * heif_encoder_get_name | ( | const struct heif_encoder * | ) |
struct heif_error heif_encoder_get_parameter | ( | struct heif_encoder * | , |
const char * | parameter_name, | ||
char * | value_ptr, | ||
int | value_size ) |
struct heif_error heif_encoder_get_parameter_boolean | ( | struct heif_encoder * | , |
const char * | parameter_name, | ||
int * | value ) |
struct heif_error heif_encoder_get_parameter_integer | ( | struct heif_encoder * | , |
const char * | parameter_name, | ||
int * | value ) |
struct heif_error heif_encoder_get_parameter_string | ( | struct heif_encoder * | , |
const char * | parameter_name, | ||
char * | value, | ||
int | value_size ) |
int heif_encoder_has_default | ( | struct heif_encoder * | , |
const char * | parameter_name ) |
const struct heif_encoder_parameter *const * heif_encoder_list_parameters | ( | struct heif_encoder * | ) |
const char * heif_encoder_parameter_get_name | ( | const struct heif_encoder_parameter * | ) |
enum heif_encoder_parameter_type heif_encoder_parameter_get_type | ( | const struct heif_encoder_parameter * | ) |
struct heif_error heif_encoder_parameter_get_valid_integer_range | ( | const struct heif_encoder_parameter * | , |
int * | have_minimum_maximum, | ||
int * | minimum, | ||
int * | maximum ) |
struct heif_error heif_encoder_parameter_get_valid_integer_values | ( | const struct heif_encoder_parameter * | , |
int * | have_minimum, | ||
int * | have_maximum, | ||
int * | minimum, | ||
int * | maximum, | ||
int * | num_valid_values, | ||
const int ** | out_integer_array ) |
struct heif_error heif_encoder_parameter_get_valid_string_values | ( | const struct heif_encoder_parameter * | , |
const char *const ** | out_stringarray ) |
struct heif_error heif_encoder_parameter_integer_valid_range | ( | struct heif_encoder * | , |
const char * | parameter_name, | ||
int * | have_minimum_maximum, | ||
int * | minimum, | ||
int * | maximum ) |
struct heif_error heif_encoder_parameter_integer_valid_values | ( | struct heif_encoder * | , |
const char * | parameter_name, | ||
int * | have_minimum, | ||
int * | have_maximum, | ||
int * | minimum, | ||
int * | maximum, | ||
int * | num_valid_values, | ||
const int ** | out_integer_array ) |
struct heif_error heif_encoder_parameter_string_valid_values | ( | struct heif_encoder * | , |
const char * | parameter_name, | ||
const char *const ** | out_stringarray ) |
void heif_encoder_release | ( | struct heif_encoder * | ) |
struct heif_error heif_encoder_set_logging_level | ( | struct heif_encoder * | , |
int | level ) |
struct heif_error heif_encoder_set_lossless | ( | struct heif_encoder * | , |
int | enable ) |
struct heif_error heif_encoder_set_lossy_quality | ( | struct heif_encoder * | , |
int | quality ) |
struct heif_error heif_encoder_set_parameter | ( | struct heif_encoder * | , |
const char * | parameter_name, | ||
const char * | value ) |
struct heif_error heif_encoder_set_parameter_boolean | ( | struct heif_encoder * | , |
const char * | parameter_name, | ||
int | value ) |
struct heif_error heif_encoder_set_parameter_integer | ( | struct heif_encoder * | , |
const char * | parameter_name, | ||
int | value ) |
struct heif_error heif_encoder_set_parameter_string | ( | struct heif_encoder * | , |
const char * | parameter_name, | ||
const char * | value ) |
struct heif_encoding_options * heif_encoding_options_alloc | ( | void | ) |
void heif_encoding_options_free | ( | struct heif_encoding_options * | ) |
heif_brand2 heif_fourcc_to_brand | ( | const char * | brand_fourcc | ) |
void heif_free_list_of_compatible_brands | ( | heif_brand2 * | brands_list | ) |
void heif_free_plugin_directories | ( | const char *const * | ) |
int heif_get_decoder_descriptors | ( | enum heif_compression_format | format_filter, |
const struct heif_decoder_descriptor ** | out_decoders, | ||
int | count ) |
int heif_get_encoder_descriptors | ( | enum heif_compression_format | format_filter, |
const char * | name_filter, | ||
const struct heif_encoder_descriptor ** | out_encoders, | ||
int | count ) |
const char * heif_get_file_mime_type | ( | const uint8_t * | data, |
int | len ) |
const char *const * heif_get_plugin_directories | ( | void | ) |
const char * heif_get_version | ( | void | ) |
uint32_t heif_get_version_number | ( | void | ) |
int heif_get_version_number_maintenance | ( | void | ) |
int heif_get_version_number_major | ( | void | ) |
int heif_get_version_number_minor | ( | void | ) |
int heif_has_compatible_brand | ( | const uint8_t * | data, |
int | len, | ||
const char * | brand_fourcc ) |
struct heif_error heif_has_compatible_filetype | ( | const uint8_t * | data, |
int | len ) |
Check the filetype box content for a supported file type.
The data is assumed to start from the start of the ftyp
box.
This function checks the compatible brands.
int heif_have_decoder_for_format | ( | enum heif_compression_format | format | ) |
int heif_have_encoder_for_format | ( | enum heif_compression_format | format | ) |
void heif_image_add_decoding_warning | ( | struct heif_image * | image, |
struct heif_error | err ) |
struct heif_error heif_image_add_plane | ( | struct heif_image * | image, |
enum heif_channel | channel, | ||
int | width, | ||
int | height, | ||
int | bit_depth ) |
Add an image plane to the image.
The image plane needs to match the colorspace and chroma of the image. Note that this does not need to be a single "planar" format - interleaved pixel channels can also be used if the chroma is interleaved.
The indicated bit_depth corresponds to the bit depth per channel. For example, with an interleaved format like RRGGBB where each color is represented by 10 bits, the bit_depth
would be 10
rather than 30
.
For backward compatibility, one can also specify 24bits for RGB and 32bits for RGBA, instead of the preferred 8 bits. However, this use is deprecated.
image | the parent image to add the channel plane to |
channel | the channel of the plane to add |
width | the width of the plane |
height | the height of the plane |
bit_depth | the bit depth per color channel |
heif_image_get_plane
or heif_image_get_plane_readonly
to determine row stride. struct heif_error heif_image_create | ( | int | width, |
int | height, | ||
enum heif_colorspace | colorspace, | ||
enum heif_chroma | chroma, | ||
struct heif_image ** | out_image ) |
Create a new image of the specified resolution and colorspace.
This does not allocate memory for the image data. Use heif_image_add_plane
to add the corresponding planes to match the specified colorspace
and chroma
.
width | the width of the image in pixels |
height | the height of the image in pixels |
colorspace | the colorspace of the image |
chroma | the chroma of the image |
out_image | pointer to pointer of the resulting image |
struct heif_error heif_image_crop | ( | struct heif_image * | img, |
int | left, | ||
int | right, | ||
int | top, | ||
int | bottom ) |
struct heif_error heif_image_extend_padding_to_size | ( | struct heif_image * | image, |
int | min_physical_width, | ||
int | min_physical_height ) |
int heif_image_get_bits_per_pixel | ( | const struct heif_image * | , |
enum heif_channel | channel ) |
int heif_image_get_bits_per_pixel_range | ( | const struct heif_image * | , |
enum heif_channel | channel ) |
enum heif_chroma heif_image_get_chroma_format | ( | const struct heif_image * | ) |
enum heif_color_profile_type heif_image_get_color_profile_type | ( | const struct heif_image * | image | ) |
enum heif_colorspace heif_image_get_colorspace | ( | const struct heif_image * | ) |
void heif_image_get_content_light_level | ( | const struct heif_image * | , |
struct heif_content_light_level * | out ) |
int heif_image_get_decoding_warnings | ( | struct heif_image * | image, |
int | first_warning_idx, | ||
struct heif_error * | out_warnings, | ||
int | max_output_buffer_entries ) |
int heif_image_get_height | ( | const struct heif_image * | img, |
enum heif_channel | channel ) |
Get the height of a specified image channel.
img | the image to get the height for |
channel | the channel to select |
void heif_image_get_mastering_display_colour_volume | ( | const struct heif_image * | , |
struct heif_mastering_display_colour_volume * | out ) |
struct heif_error heif_image_get_nclx_color_profile | ( | const struct heif_image * | image, |
struct heif_color_profile_nclx ** | out_data ) |
void heif_image_get_pixel_aspect_ratio | ( | const struct heif_image * | , |
uint32_t * | aspect_h, | ||
uint32_t * | aspect_v ) |
uint8_t * heif_image_get_plane | ( | struct heif_image * | , |
enum heif_channel | channel, | ||
int * | out_stride ) |
const uint8_t * heif_image_get_plane_readonly | ( | const struct heif_image * | , |
enum heif_channel | channel, | ||
int * | out_stride ) |
int heif_image_get_primary_height | ( | const struct heif_image * | img | ) |
Get the height of the main channel.
This is the Y channel in YCbCr or mono, or any in RGB.
img | the image to get the primary height for |
int heif_image_get_primary_width | ( | const struct heif_image * | img | ) |
Get the width of the main channel.
This is the Y channel in YCbCr or mono, or any in RGB.
img | the image to get the primary width for |
struct heif_error heif_image_get_raw_color_profile | ( | const struct heif_image * | image, |
void * | out_data ) |
size_t heif_image_get_raw_color_profile_size | ( | const struct heif_image * | image | ) |
int heif_image_get_width | ( | const struct heif_image * | img, |
enum heif_channel | channel ) |
Get the width of a specified image channel.
img | the image to get the width for |
channel | the channel to select |
void heif_image_handle_free_auxiliary_types | ( | const struct heif_image_handle * | handle, |
const char ** | out_type ) |
struct heif_error heif_image_handle_get_auxiliary_image_handle | ( | const struct heif_image_handle * | main_image_handle, |
heif_item_id | auxiliary_id, | ||
struct heif_image_handle ** | out_auxiliary_handle ) |
struct heif_error heif_image_handle_get_auxiliary_type | ( | const struct heif_image_handle * | handle, |
const char ** | out_type ) |
struct heif_error heif_image_handle_get_camera_extrinsic_matrix | ( | const struct heif_image_handle * | handle, |
struct heif_camera_extrinsic_matrix ** | out_matrix ) |
struct heif_error heif_image_handle_get_camera_intrinsic_matrix | ( | const struct heif_image_handle * | handle, |
struct heif_camera_intrinsic_matrix * | out_matrix ) |
int heif_image_handle_get_chroma_bits_per_pixel | ( | const struct heif_image_handle * | ) |
enum heif_color_profile_type heif_image_handle_get_color_profile_type | ( | const struct heif_image_handle * | handle | ) |
struct heif_context * heif_image_handle_get_context | ( | const struct heif_image_handle * | handle | ) |
struct heif_error heif_image_handle_get_depth_image_handle | ( | const struct heif_image_handle * | handle, |
heif_item_id | depth_image_id, | ||
struct heif_image_handle ** | out_depth_handle ) |
int heif_image_handle_get_depth_image_representation_info | ( | const struct heif_image_handle * | handle, |
heif_item_id | depth_image_id, | ||
const struct heif_depth_representation_info ** | out ) |
int heif_image_handle_get_height | ( | const struct heif_image_handle * | handle | ) |
int heif_image_handle_get_ispe_height | ( | const struct heif_image_handle * | handle | ) |
int heif_image_handle_get_ispe_width | ( | const struct heif_image_handle * | handle | ) |
heif_item_id heif_image_handle_get_item_id | ( | const struct heif_image_handle * | handle | ) |
int heif_image_handle_get_list_of_auxiliary_image_IDs | ( | const struct heif_image_handle * | handle, |
int | aux_filter, | ||
heif_item_id * | ids, | ||
int | count ) |
int heif_image_handle_get_list_of_depth_image_IDs | ( | const struct heif_image_handle * | handle, |
heif_item_id * | ids, | ||
int | count ) |
int heif_image_handle_get_list_of_metadata_block_IDs | ( | const struct heif_image_handle * | handle, |
const char * | type_filter, | ||
heif_item_id * | ids, | ||
int | count ) |
int heif_image_handle_get_list_of_thumbnail_IDs | ( | const struct heif_image_handle * | handle, |
heif_item_id * | ids, | ||
int | count ) |
int heif_image_handle_get_luma_bits_per_pixel | ( | const struct heif_image_handle * | ) |
struct heif_error heif_image_handle_get_metadata | ( | const struct heif_image_handle * | handle, |
heif_item_id | metadata_id, | ||
void * | out_data ) |
const char * heif_image_handle_get_metadata_content_type | ( | const struct heif_image_handle * | handle, |
heif_item_id | metadata_id ) |
const char * heif_image_handle_get_metadata_item_uri_type | ( | const struct heif_image_handle * | handle, |
heif_item_id | metadata_id ) |
size_t heif_image_handle_get_metadata_size | ( | const struct heif_image_handle * | handle, |
heif_item_id | metadata_id ) |
const char * heif_image_handle_get_metadata_type | ( | const struct heif_image_handle * | handle, |
heif_item_id | metadata_id ) |
struct heif_error heif_image_handle_get_nclx_color_profile | ( | const struct heif_image_handle * | handle, |
struct heif_color_profile_nclx ** | out_data ) |
int heif_image_handle_get_number_of_auxiliary_images | ( | const struct heif_image_handle * | handle, |
int | aux_filter ) |
int heif_image_handle_get_number_of_depth_images | ( | const struct heif_image_handle * | handle | ) |
int heif_image_handle_get_number_of_metadata_blocks | ( | const struct heif_image_handle * | handle, |
const char * | type_filter ) |
int heif_image_handle_get_number_of_thumbnails | ( | const struct heif_image_handle * | handle | ) |
struct heif_error heif_image_handle_get_preferred_decoding_colorspace | ( | const struct heif_image_handle * | image_handle, |
enum heif_colorspace * | out_colorspace, | ||
enum heif_chroma * | out_chroma ) |
struct heif_error heif_image_handle_get_raw_color_profile | ( | const struct heif_image_handle * | handle, |
void * | out_data ) |
size_t heif_image_handle_get_raw_color_profile_size | ( | const struct heif_image_handle * | handle | ) |
struct heif_error heif_image_handle_get_thumbnail | ( | const struct heif_image_handle * | main_image_handle, |
heif_item_id | thumbnail_id, | ||
struct heif_image_handle ** | out_thumbnail_handle ) |
int heif_image_handle_get_width | ( | const struct heif_image_handle * | handle | ) |
int heif_image_handle_has_alpha_channel | ( | const struct heif_image_handle * | ) |
int heif_image_handle_has_camera_extrinsic_matrix | ( | const struct heif_image_handle * | handle | ) |
int heif_image_handle_has_camera_intrinsic_matrix | ( | const struct heif_image_handle * | handle | ) |
int heif_image_handle_has_depth_image | ( | const struct heif_image_handle * | ) |
int heif_image_handle_is_premultiplied_alpha | ( | const struct heif_image_handle * | ) |
int heif_image_handle_is_primary_image | ( | const struct heif_image_handle * | handle | ) |
void heif_image_handle_release | ( | const struct heif_image_handle * | ) |
void heif_image_handle_release_auxiliary_type | ( | const struct heif_image_handle * | handle, |
const char ** | out_type ) |
int heif_image_has_channel | ( | const struct heif_image * | , |
enum heif_channel | channel ) |
int heif_image_has_content_light_level | ( | const struct heif_image * | ) |
int heif_image_has_mastering_display_colour_volume | ( | const struct heif_image * | ) |
int heif_image_is_premultiplied_alpha | ( | struct heif_image * | image | ) |
void heif_image_release | ( | const struct heif_image * | ) |
struct heif_error heif_image_scale_image | ( | const struct heif_image * | input, |
struct heif_image ** | output, | ||
int | width, | ||
int | height, | ||
const struct heif_scaling_options * | options ) |
void heif_image_set_content_light_level | ( | const struct heif_image * | , |
const struct heif_content_light_level * | in ) |
void heif_image_set_mastering_display_colour_volume | ( | const struct heif_image * | , |
const struct heif_mastering_display_colour_volume * | in ) |
struct heif_error heif_image_set_nclx_color_profile | ( | struct heif_image * | image, |
const struct heif_color_profile_nclx * | color_profile ) |
void heif_image_set_pixel_aspect_ratio | ( | struct heif_image * | , |
uint32_t | aspect_h, | ||
uint32_t | aspect_v ) |
void heif_image_set_premultiplied_alpha | ( | struct heif_image * | image, |
int | is_premultiplied_alpha ) |
struct heif_error heif_image_set_raw_color_profile | ( | struct heif_image * | image, |
const char * | profile_type_fourcc_string, | ||
const void * | profile_data, | ||
const size_t | profile_size ) |
struct heif_error heif_init | ( | struct heif_init_params * | ) |
Initialise library.
You should call heif_init() when you start using libheif and heif_deinit() when you are finished. These calls are reference counted. Each call to heif_init() should be matched by one call to heif_deinit().
For backwards compatibility, it is not really necessary to call heif_init(), but some library memory objects will never be freed if you do not call heif_init()/heif_deinit().
heif_init() will load the external modules installed in the default plugin path. Thus, you need it when you want to load external plugins from the default path. Codec plugins that are compiled into the library directly (selected by the compile-time parameters of libheif) will be available even without heif_init().
Make sure that you do not have one part of your program use heif_init()/heif_deinit() and another part that does not use it as the latter may try to use an uninitialized library. If in doubt, enclose everything with init/deinit.
You may pass nullptr to get default parameters. Currently, no parameters are supported.
struct heif_error heif_list_compatible_brands | ( | const uint8_t * | data, |
int | len, | ||
heif_brand2 ** | out_brands, | ||
int * | out_size ) |
struct heif_error heif_load_plugin | ( | const char * | filename, |
struct heif_plugin_info const ** | out_plugin ) |
struct heif_error heif_load_plugins | ( | const char * | directory, |
const struct heif_plugin_info ** | out_plugins, | ||
int * | out_nPluginsLoaded, | ||
int | output_array_size ) |
enum heif_brand heif_main_brand | ( | const uint8_t * | data, |
int | len ) |
struct heif_error heif_mastering_display_colour_volume_decode | ( | const struct heif_mastering_display_colour_volume * | in, |
struct heif_decoded_mastering_display_colour_volume * | out ) |
struct heif_color_profile_nclx * heif_nclx_color_profile_alloc | ( | void | ) |
void heif_nclx_color_profile_free | ( | struct heif_color_profile_nclx * | nclx_profile | ) |
struct heif_error heif_nclx_color_profile_set_color_primaries | ( | struct heif_color_profile_nclx * | nclx, |
uint16_t | cp ) |
struct heif_error heif_nclx_color_profile_set_matrix_coefficients | ( | struct heif_color_profile_nclx * | nclx, |
uint16_t | matrix_coefficients ) |
struct heif_error heif_nclx_color_profile_set_transfer_characteristics | ( | struct heif_color_profile_nclx * | nclx, |
uint16_t | transfer_characteristics ) |
heif_brand2 heif_read_main_brand | ( | const uint8_t * | data, |
int | len ) |
struct heif_error heif_register_decoder | ( | struct heif_context * | heif, |
const struct heif_decoder_plugin * | ) |
struct heif_error heif_register_decoder_plugin | ( | const struct heif_decoder_plugin * | ) |
struct heif_error heif_register_encoder_plugin | ( | const struct heif_encoder_plugin * | ) |
struct heif_error heif_unload_plugin | ( | const struct heif_plugin_info * | plugin | ) |
|
extern |