File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ NEW or CHANGED MINIMUM dependencies since the last major release are **bold**.
6464 * giflib >= 5.0 (tested through 5.2.2)
6565 * If you want support for HEIF/HEIC or AVIF images:
6666 * libheif >= 1.11 (1.16 required for correct orientation support,
67- tested through 1.20.2 )
67+ tested through 1.21.1 )
6868 * libheif must be built with an AV1 encoder/decoder for AVIF support.
6969 * If you want support for DICOM medical image files:
7070 * DCMTK >= 3.6.1 (tested through 3.6.9)
Original file line number Diff line number Diff line change @@ -287,7 +287,14 @@ HeifInput::seek_subimage(int subimage, int miplevel)
287287 m_ihandle.get_raw_image_handle (), &nclx);
288288
289289 if (nclx) {
290- if (err.code == heif_error_Ok) {
290+ // When CICP metadata is not present in the file, libheif returns
291+ // unspecified since v1.21. Ignore it then.
292+ if (err.code == heif_error_Ok
293+ && !(nclx->color_primaries == heif_color_primaries_unspecified
294+ && nclx->transfer_characteristics
295+ == heif_transfer_characteristic_unspecified
296+ && nclx->matrix_coefficients
297+ == heif_matrix_coefficients_unspecified)) {
291298 const int cicp[4 ] = { int (nclx->color_primaries ),
292299 int (nclx->transfer_characteristics ),
293300 int (nclx->matrix_coefficients ),
You can’t perform that action at this time.
0 commit comments