Skip to content

Commit f0b68bb

Browse files
committed
Add warning if tile is missing / can not be decoded.
1 parent da4e4b6 commit f0b68bb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

libheif/image-items/grid.cc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,12 @@ Error ImageItem_Grid::decode_and_paste_tile_image(heif_item_id tileID, uint32_t
469469
auto tileItem = get_context()->get_image(tileID, true);
470470
if (!tileItem && !options.strict_decoding) {
471471
// We ignore missing images.
472+
if (inout_image) {
473+
inout_image->add_warning(Error{
474+
heif_error_Invalid_input,
475+
heif_suberror_Missing_grid_images,
476+
});
477+
}
472478
return progress_and_return_ok(options, progress_counter);
473479
}
474480

@@ -481,6 +487,12 @@ Error ImageItem_Grid::decode_and_paste_tile_image(heif_item_id tileID, uint32_t
481487
if (!decodeResult) {
482488
if (!options.strict_decoding) {
483489
// We ignore broken tiles.
490+
if (inout_image) {
491+
inout_image->add_warning(Error{
492+
heif_error_Invalid_input,
493+
heif_suberror_Missing_grid_images,
494+
});
495+
}
484496
return progress_and_return_ok(options, progress_counter);
485497
}
486498

0 commit comments

Comments
 (0)