pub unsafe extern "C" fn heif_get_file_mime_type(
    data: *const u8,
    len: c_int
) -> *const c_char
Expand description

Returns one of these MIME types:

  • image/heic HEIF file using h265 compression
  • image/heif HEIF file using any other compression
  • image/heic-sequence HEIF image sequence using h265 compression
  • image/heif-sequence HEIF image sequence using any other compression
  • image/avif AVIF image
  • image/avif-sequence AVIF sequence
  • image/jpeg JPEG image
  • image/png PNG image If the format could not be detected, an empty string is returned.

Provide at least 12 bytes of input. With less input, its format might not be detected. You may also provide more input to increase detection accuracy.

Note that JPEG and PNG images cannot be decoded by libheif even though the formats are detected by this function.