diff --git a/libheif/image-items/overlay.cc b/libheif/image-items/overlay.cc index 0b64af45a5..b4b17a6a2c 100644 --- a/libheif/image-items/overlay.cc +++ b/libheif/image-items/overlay.cc @@ -424,11 +424,13 @@ Result> ImageItem_Overlay::add_new_overlay_it file->add_iref_reference(iovl_id, fourcc("dimg"), ref_ids); // Add ISPE property - file->add_ispe_property(iovl_id, overlayspec.get_canvas_width(), overlayspec.get_canvas_height(), false); + auto ispe = std::make_shared(); + ispe->set_size(overlayspec.get_canvas_width(), overlayspec.get_canvas_height()); + iovl_image->add_property(ispe, false); // Add PIXI property (copy from first image) - According to MIAF, all images shall have the same color information. auto pixi = file->get_property_for_item(ref_ids[0]); - file->add_property(iovl_id, pixi, true); + iovl_image->add_property(pixi, true); // Set Brands //m_heif_file->set_brand(encoder->plugin->compression_format,