Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libheif for openSUSE:Factory checked 
in at 2025-08-09 19:59:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libheif (Old)
 and      /work/SRC/openSUSE:Factory/.libheif.new.1085 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libheif"

Sat Aug  9 19:59:02 2025 rev:47 rq:1298375 version:1.20.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/libheif/libheif.changes  2025-07-31 
17:45:35.082618289 +0200
+++ /work/SRC/openSUSE:Factory/.libheif.new.1085/libheif.changes        
2025-08-09 20:05:10.407665083 +0200
@@ -1,0 +2,13 @@
+Fri Aug  8 00:55:54 UTC 2025 - Marcus Rueckert <mrueck...@suse.de>
+
+- update to 1.20.2:
+  - When opening tiled images, do not check against maximum image
+    size immediately to allow for tile-based decoding of very large
+    images.
+  - Several smaller fixes in writing image sequences
+  - CMake option to disable building of heif-view, which pulls in
+    dependency on SDL
+  - Fixes reading/writing of GIMI content IDs
+  - Some build fixes
+
+-------------------------------------------------------------------

Old:
----
  libheif-1.20.1.tar.gz

New:
----
  libheif-1.20.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libheif.spec ++++++
--- /var/tmp/diff_new_pack.2SgSg4/_old  2025-08-09 20:05:10.971688797 +0200
+++ /var/tmp/diff_new_pack.2SgSg4/_new  2025-08-09 20:05:10.975688964 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package libheif
 #
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2025 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -45,7 +45,7 @@
 %bcond_with heif_view
 
 Name:           libheif%{?psuffix}
-Version:        1.20.1
+Version:        1.20.2
 Release:        0
 Summary:        HEIF/AVIF file format decoder and encoder
 License:        LGPL-3.0-only AND MIT

++++++ libheif-1.20.1.tar.gz -> libheif-1.20.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/CMakeLists.txt 
new/libheif-1.20.2/CMakeLists.txt
--- old/libheif-1.20.1/CMakeLists.txt   2025-07-02 15:05:31.000000000 +0200
+++ new/libheif-1.20.2/CMakeLists.txt   2025-08-05 12:30:32.000000000 +0200
@@ -1,6 +1,6 @@
 cmake_minimum_required (VERSION 3.16.3) # Oldest Ubuntu LTS (20.04 currently)
 
-project(libheif LANGUAGES C CXX VERSION 1.20.1)
+project(libheif LANGUAGES C CXX VERSION 1.20.2)
 
 # compatibility_version is never allowed to be decreased for any specific 
SONAME.
 # Libtool in the libheif-1.15.1 release had set it to 17.0.0, so we have to 
use this for the v1.x.y versions.
@@ -495,6 +495,7 @@
 # ---
 
 option(WITH_EXAMPLES "Build examples" ON)
+option(WITH_EXAMPLE_HEIF_VIEW "Build heif-view tool" ON)
 option(WITH_GDK_PIXBUF "Build gdk-pixbuf plugin" ON)
 
 option(WITH_REDUCED_VISIBILITY "Reduced symbol visibility in library" ON)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/examples/CMakeLists.txt 
new/libheif-1.20.2/examples/CMakeLists.txt
--- old/libheif-1.20.1/examples/CMakeLists.txt  2025-07-02 15:05:31.000000000 
+0200
+++ new/libheif-1.20.2/examples/CMakeLists.txt  2025-08-05 12:30:32.000000000 
+0200
@@ -65,18 +65,21 @@
 endif()
 
 
-find_package(SDL2 NO_MODULE)
 
-if (SDL2_FOUND)
-    add_executable(heif-view ${getopt_sources}
-            heif_view.cc
-            sdl.cc
-            sdl.hh
-            common.cc
-            common.h)
-    target_link_libraries(heif-view PRIVATE heif ${SDL2_LIBRARIES})
-    target_include_directories(heif-view PRIVATE ${libheif_SOURCE_DIR} 
${SDL2_INCLUDE_DIRS})
-    install(TARGETS heif-view RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+if (WITH_EXAMPLE_HEIF_VIEW)
+    find_package(SDL2 NO_MODULE)
+
+    if (SDL2_FOUND)
+        add_executable(heif-view ${getopt_sources}
+                heif_view.cc
+                sdl.cc
+                sdl.hh
+                common.cc
+                common.h)
+        target_link_libraries(heif-view PRIVATE heif ${SDL2_LIBRARIES})
+        target_include_directories(heif-view PRIVATE ${libheif_SOURCE_DIR} 
${SDL2_INCLUDE_DIRS})
+        install(TARGETS heif-view RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+    endif ()
 endif ()
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/examples/heif_test.cc 
new/libheif-1.20.2/examples/heif_test.cc
--- old/libheif-1.20.1/examples/heif_test.cc    2025-07-02 15:05:31.000000000 
+0200
+++ new/libheif-1.20.2/examples/heif_test.cc    2025-08-05 12:30:32.000000000 
+0200
@@ -150,7 +150,7 @@
           int bytes = (img.get_bits_per_pixel(channel) + 7) / 8;
 
           size_t stride;
-          const uint8_t* p = img.get_plane(channel, &stride);
+          const uint8_t* p = img.get_plane2(channel, &stride);
           for (int y = 0; y < height; y++) {
             fwrite(p + y * stride, width, bytes, stdout);
           }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/CMakeLists.txt 
new/libheif-1.20.2/libheif/CMakeLists.txt
--- old/libheif-1.20.1/libheif/CMakeLists.txt   2025-07-02 15:05:31.000000000 
+0200
+++ new/libheif-1.20.2/libheif/CMakeLists.txt   2025-08-05 12:30:32.000000000 
+0200
@@ -62,7 +62,7 @@
         region.h
         brands.cc
         brands.h
-        api/libheif/api_structs.h
+        api_structs.h
         api/libheif/heif.cc
         api/libheif/heif_library.cc
         api/libheif/heif_image.cc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/api/libheif/api_structs.h 
new/libheif-1.20.2/libheif/api/libheif/api_structs.h
--- old/libheif-1.20.1/libheif/api/libheif/api_structs.h        2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/api/libheif/api_structs.h        1970-01-01 
01:00:00.000000000 +0100
@@ -1,107 +0,0 @@
-/*
- * HEIF codec.
- * Copyright (c) 2017 Dirk Farin <dirk.fa...@gmail.com>
- *
- * This file is part of libheif.
- *
- * libheif is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version.
- *
- * libheif is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with libheif.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef HEIF_API_STRUCTS_H
-#define HEIF_API_STRUCTS_H
-
-#include "pixelimage.h"
-#include "context.h"
-
-#include <memory>
-#include <vector>
-#include <string>
-#include "image-items/image_item.h"
-
-struct heif_image_handle
-{
-  std::shared_ptr<ImageItem> image;
-
-  // store reference to keep the context alive while we are using the handle 
(issue #147)
-  std::shared_ptr<HeifContext> context;
-};
-
-
-struct heif_track
-{
-  std::shared_ptr<Track> track;
-
-  // store reference to keep the context alive while we are using the handle 
(issue #147)
-  std::shared_ptr<HeifContext> context;
-};
-
-struct heif_raw_sequence_sample
-{
-  ~heif_raw_sequence_sample()
-  {
-    heif_tai_timestamp_packet_release(timestamp);
-  }
-
-  std::vector<uint8_t> data;
-  uint32_t duration = 0;
-
-  heif_tai_timestamp_packet* timestamp = nullptr;
-  std::string gimi_sample_content_id;
-};
-
-
-struct heif_image
-{
-  std::shared_ptr<HeifPixelImage> image;
-};
-
-
-struct heif_context
-{
-  std::shared_ptr<HeifContext> context;
-};
-
-
-struct heif_encoder
-{
-  heif_encoder(const struct heif_encoder_plugin* plugin);
-
-  ~heif_encoder();
-
-  struct heif_error alloc();
-
-  void release();
-
-
-  const struct heif_encoder_plugin* plugin;
-  void* encoder = nullptr;
-};
-
-
-struct heif_region_item
-{
-  std::shared_ptr<HeifContext> context;
-  std::shared_ptr<RegionItem> region_item;
-};
-
-
-struct heif_region
-{
-  std::shared_ptr<HeifContext> context; // we need this to perform coordinate 
transformation
-  //heif_item_id parent_region_item_id; // we need this to perform coordinate 
transformation
-  std::shared_ptr<RegionItem> region_item;
-  std::shared_ptr<RegionGeometry> region;
-};
-
-#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/api/libheif/heif_cxx.h 
new/libheif-1.20.2/libheif/api/libheif/heif_cxx.h
--- old/libheif-1.20.1/libheif/api/libheif/heif_cxx.h   2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/api/libheif/heif_cxx.h   2025-08-05 
12:30:32.000000000 +0200
@@ -345,9 +345,15 @@
 
     bool has_channel(enum heif_channel channel) const noexcept;
 
-    const uint8_t* get_plane(enum heif_channel channel, size_t* out_stride) 
const noexcept;
+    // DEPRECATED
+    const uint8_t* get_plane(enum heif_channel channel, int* out_stride) const 
noexcept;
 
-    uint8_t* get_plane(enum heif_channel channel, size_t* out_stride) noexcept;
+    // DEPRECATED
+    uint8_t* get_plane(enum heif_channel channel, int* out_stride) noexcept;
+
+    const uint8_t* get_plane2(enum heif_channel channel, size_t* out_stride) 
const noexcept;
+
+    uint8_t* get_plane2(enum heif_channel channel, size_t* out_stride) 
noexcept;
 
     // throws Error
     void set_nclx_color_profile(const ColorProfile_nclx&);
@@ -552,7 +558,11 @@
           heif_reader_trampoline_get_position,
           heif_reader_trampoline_read,
           heif_reader_trampoline_seek,
-          heif_reader_trampoline_wait_for_file_size
+          heif_reader_trampoline_wait_for_file_size,
+          NULL,
+          NULL,
+          NULL,
+          NULL,
       };
 
   inline void Context::read_from_reader(Reader& reader, const ReadingOptions& 
/*opts*/)
@@ -906,12 +916,22 @@
     return heif_image_has_channel(m_image.get(), channel);
   }
 
-  inline const uint8_t* Image::get_plane(enum heif_channel channel, size_t* 
out_stride) const noexcept
+  inline const uint8_t* Image::get_plane(enum heif_channel channel, int* 
out_stride) const noexcept
+  {
+    return heif_image_get_plane_readonly(m_image.get(), channel, out_stride);
+  }
+
+  inline uint8_t* Image::get_plane(enum heif_channel channel, int* out_stride) 
noexcept
+  {
+    return heif_image_get_plane(m_image.get(), channel, out_stride);
+  }
+
+  inline const uint8_t* Image::get_plane2(enum heif_channel channel, size_t* 
out_stride) const noexcept
   {
     return heif_image_get_plane_readonly2(m_image.get(), channel, out_stride);
   }
 
-  inline uint8_t* Image::get_plane(enum heif_channel channel, size_t* 
out_stride) noexcept
+  inline uint8_t* Image::get_plane2(enum heif_channel channel, size_t* 
out_stride) noexcept
   {
     return heif_image_get_plane2(m_image.get(), channel, out_stride);
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/api/libheif/heif_emscripten.h 
new/libheif-1.20.2/libheif/api/libheif/heif_emscripten.h
--- old/libheif-1.20.1/libheif/api/libheif/heif_emscripten.h    2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/api/libheif/heif_emscripten.h    2025-08-05 
12:30:32.000000000 +0200
@@ -315,6 +315,8 @@
     EXPORT_HEIF_FUNCTION(heif_image_handle_get_height);
     EXPORT_HEIF_FUNCTION(heif_image_handle_is_primary_image);
     EXPORT_HEIF_FUNCTION(heif_image_release);
+    EXPORT_HEIF_FUNCTION(heif_image_handle_has_alpha_channel);
+    EXPORT_HEIF_FUNCTION(heif_image_handle_is_premultiplied_alpha);
 
     emscripten::enum_<heif_error_code>("heif_error_code")
     .value("heif_error_Ok", heif_error_Ok)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/api/libheif/heif_metadata.cc 
new/libheif-1.20.2/libheif/api/libheif/heif_metadata.cc
--- old/libheif-1.20.1/libheif/api/libheif/heif_metadata.cc     2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/api/libheif/heif_metadata.cc     2025-08-05 
12:30:32.000000000 +0200
@@ -20,7 +20,7 @@
 
 #include "heif_metadata.h"
 #include "libheif/heif.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 
 #include "box.h"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/api/libheif/heif_regions.cc 
new/libheif-1.20.2/libheif/api/libheif/heif_regions.cc
--- old/libheif-1.20.1/libheif/api/libheif/heif_regions.cc      2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/api/libheif/heif_regions.cc      2025-08-05 
12:30:32.000000000 +0200
@@ -76,7 +76,7 @@
 heif_item_id heif_region_item_get_id(struct heif_region_item* region_item)
 {
   if (region_item == nullptr) {
-    return -1;
+    return 0;
   }
 
   return region_item->region_item->item_id;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/api/libheif/heif_regions.h 
new/libheif-1.20.2/libheif/api/libheif/heif_regions.h
--- old/libheif-1.20.1/libheif/api/libheif/heif_regions.h       2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/api/libheif/heif_regions.h       2025-08-05 
12:30:32.000000000 +0200
@@ -43,7 +43,7 @@
 enum heif_region_type
 {
   /**
-   * Point gemetry.
+   * Point geometry.
    *
    * The region is represented by a single point.
    */
@@ -174,7 +174,7 @@
  * Get the item identifier for a region item.
  *
  * @param region_item the region item to query
- * @return the region item identifier (or -1 if the region_item is null)
+ * @return the region item identifier (or 0 if the region_item is null)
  */
 LIBHEIF_API
 heif_item_id heif_region_item_get_id(heif_region_item* region_item);
@@ -420,7 +420,7 @@
  * The points are returned as pairs of X,Y coordinates, in the order 
X<sub>1</sub>,
  * Y<sub>1</sub>, X<sub>2</sub>, Y<sub>2</sub>, ..., X<sub>n</sub>, 
Y<sub>n</sub>.
  *
- * @param region the region to equery, which must be of type 
#heif_region_type_polygon
+ * @param region the region to query, which must be of type 
#heif_region_type_polygon
  * @param out_pts_array the array to return the points in, which must have 
twice as many entries as there are points
  * in the polygon.
  * @return heif_error_ok on success, or an error value indicating the problem 
on failure
@@ -442,7 +442,7 @@
  * The points are returned as pairs of X,Y coordinates, in the order 
X<sub>1</sub>,
  * Y<sub>1</sub>, X<sub>2</sub>, Y<sub>2</sub>, ..., X<sub>n</sub>, 
Y<sub>n</sub>.
  *
- * @param region the region to equery, which must be of type 
#heif_region_type_polygon
+ * @param region the region to query, which must be of type 
#heif_region_type_polygon
  * @param image_id the identifier for the image to transform / scale the 
region to
  * @param out_pts_array the array to return the points in, which must have 
twice as many entries as there are points
  * in the polygon.
@@ -484,7 +484,7 @@
  * }
  * @endcode
  *
- * @param region the region to equery, which must be of type 
#heif_region_type_polyline
+ * @param region the region to query, which must be of type 
#heif_region_type_polyline
  * @param out_pts_array the array to return the points in, which must have 
twice as many entries as there are points
  * in the polyline.
  * @return heif_error_ok on success, or an error value indicating the problem 
on failure
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/api/libheif/heif_sequences.cc 
new/libheif-1.20.2/libheif/api/libheif/heif_sequences.cc
--- old/libheif-1.20.1/libheif/api/libheif/heif_sequences.cc    2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/api/libheif/heif_sequences.cc    2025-08-05 
12:30:32.000000000 +0200
@@ -440,14 +440,9 @@
   heif_encoding_options* encoding_options = heif_encoding_options_alloc();
   heif_color_profile_nclx nclx;
   if (sequence_encoding_options) {
-    if (sequence_encoding_options->version >= 4) {
-      // the const_cast<> is ok, because output_nclx_profile will not be 
changed. It should actually be const, but we cannot change that.
-      encoding_options->output_nclx_profile = 
const_cast<heif_color_profile_nclx*>(sequence_encoding_options->output_nclx_profile);
-    }
-
-    if (sequence_encoding_options->version >= 6) {
-      encoding_options->color_conversion_options = 
sequence_encoding_options->color_conversion_options;
-    }
+    // the const_cast<> is ok, because output_nclx_profile will not be 
changed. It should actually be const, but we cannot change that.
+    encoding_options->output_nclx_profile = 
const_cast<heif_color_profile_nclx*>(sequence_encoding_options->output_nclx_profile);
+    encoding_options->color_conversion_options = 
sequence_encoding_options->color_conversion_options;
 
     if (encoding_options->output_nclx_profile == nullptr) {
       auto input_nclx = input_image->image->get_color_profile_nclx();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libheif-1.20.1/libheif/api/libheif/heif_tai_timestamps.cc 
new/libheif-1.20.2/libheif/api/libheif/heif_tai_timestamps.cc
--- old/libheif-1.20.1/libheif/api/libheif/heif_tai_timestamps.cc       
2025-07-02 15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/api/libheif/heif_tai_timestamps.cc       
2025-08-05 12:30:32.000000000 +0200
@@ -19,7 +19,7 @@
  */
 
 #include <libheif/heif_tai_timestamps.h>
-#include <libheif/api_structs.h>
+#include "api_structs.h"
 #include "box.h"
 #include "file.h"
 #include <memory>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/api_structs.h 
new/libheif-1.20.2/libheif/api_structs.h
--- old/libheif-1.20.1/libheif/api_structs.h    1970-01-01 01:00:00.000000000 
+0100
+++ new/libheif-1.20.2/libheif/api_structs.h    2025-08-05 12:30:32.000000000 
+0200
@@ -0,0 +1,107 @@
+/*
+ * HEIF codec.
+ * Copyright (c) 2017 Dirk Farin <dirk.fa...@gmail.com>
+ *
+ * This file is part of libheif.
+ *
+ * libheif is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of
+ * the License, or (at your option) any later version.
+ *
+ * libheif is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with libheif.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef HEIF_API_STRUCTS_H
+#define HEIF_API_STRUCTS_H
+
+#include "pixelimage.h"
+#include "context.h"
+
+#include <memory>
+#include <vector>
+#include <string>
+#include "image-items/image_item.h"
+
+struct heif_image_handle
+{
+  std::shared_ptr<ImageItem> image;
+
+  // store reference to keep the context alive while we are using the handle 
(issue #147)
+  std::shared_ptr<HeifContext> context;
+};
+
+
+struct heif_track
+{
+  std::shared_ptr<Track> track;
+
+  // store reference to keep the context alive while we are using the handle 
(issue #147)
+  std::shared_ptr<HeifContext> context;
+};
+
+struct heif_raw_sequence_sample
+{
+  ~heif_raw_sequence_sample()
+  {
+    heif_tai_timestamp_packet_release(timestamp);
+  }
+
+  std::vector<uint8_t> data;
+  uint32_t duration = 0;
+
+  heif_tai_timestamp_packet* timestamp = nullptr;
+  std::string gimi_sample_content_id;
+};
+
+
+struct heif_image
+{
+  std::shared_ptr<HeifPixelImage> image;
+};
+
+
+struct heif_context
+{
+  std::shared_ptr<HeifContext> context;
+};
+
+
+struct heif_encoder
+{
+  heif_encoder(const struct heif_encoder_plugin* plugin);
+
+  ~heif_encoder();
+
+  struct heif_error alloc();
+
+  void release();
+
+
+  const struct heif_encoder_plugin* plugin;
+  void* encoder = nullptr;
+};
+
+
+struct heif_region_item
+{
+  std::shared_ptr<HeifContext> context;
+  std::shared_ptr<RegionItem> region_item;
+};
+
+
+struct heif_region
+{
+  std::shared_ptr<HeifContext> context; // we need this to perform coordinate 
transformation
+  //heif_item_id parent_region_item_id; // we need this to perform coordinate 
transformation
+  std::shared_ptr<RegionItem> region_item;
+  std::shared_ptr<RegionGeometry> region;
+};
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/box.cc 
new/libheif-1.20.2/libheif/box.cc
--- old/libheif-1.20.1/libheif/box.cc   2025-07-02 15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/box.cc   2025-08-05 12:30:32.000000000 +0200
@@ -3307,7 +3307,7 @@
 
     for (size_t n = 0; n < nAssoc - 1; n++)
       for (size_t i = 0; i < nAssoc - 1 - n; i++) {
-        // If transformative property preceds descriptive property, swap them.
+        // If transformative property precedes descriptive property, swap them.
         if (properties[item.associations[i].property_index - 
1]->is_transformative_property() &&
             !properties[item.associations[i + 1].property_index - 
1]->is_transformative_property()) {
           std::swap(item.associations[i], item.associations[i+1]);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/box.h 
new/libheif-1.20.2/libheif/box.h
--- old/libheif-1.20.1/libheif/box.h    2025-07-02 15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/box.h    2025-08-05 12:30:32.000000000 +0200
@@ -1714,7 +1714,7 @@
   /**
    * clock_type.
    * 
-   * 0 = Clock type is unkown
+   * 0 = Clock type is unknown
    * 1 = The clock does not synchronize to an atomic source of absolute TAI 
time
    * 2 = The clock can synchronize to an atomic source of absolute TAI time
    */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/codecs/avif_boxes.cc 
new/libheif-1.20.2/libheif/codecs/avif_boxes.cc
--- old/libheif-1.20.1/libheif/codecs/avif_boxes.cc     2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/codecs/avif_boxes.cc     2025-08-05 
12:30:32.000000000 +0200
@@ -23,7 +23,7 @@
 #include "avif_dec.h"
 #include "bitstream.h"
 #include "common_utils.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include "file.h"
 #include <iomanip>
 #include <limits>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/codecs/avif_enc.cc 
new/libheif-1.20.2/libheif/codecs/avif_enc.cc
--- old/libheif-1.20.1/libheif/codecs/avif_enc.cc       2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/codecs/avif_enc.cc       2025-08-05 
12:30:32.000000000 +0200
@@ -22,7 +22,7 @@
 #include "avif_boxes.h"
 #include "error.h"
 #include "context.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 
 #include <string>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/codecs/decoder.cc 
new/libheif-1.20.2/libheif/codecs/decoder.cc
--- old/libheif-1.20.1/libheif/codecs/decoder.cc        2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/codecs/decoder.cc        2025-08-05 
12:30:32.000000000 +0200
@@ -24,7 +24,7 @@
 #include "error.h"
 #include "context.h"
 #include "plugin_registry.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 
 #include "codecs/hevc_dec.h"
 #include "codecs/avif_dec.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/codecs/encoder.cc 
new/libheif-1.20.2/libheif/codecs/encoder.cc
--- old/libheif-1.20.1/libheif/codecs/encoder.cc        2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/codecs/encoder.cc        2025-08-05 
12:30:32.000000000 +0200
@@ -23,7 +23,7 @@
 #include "error.h"
 #include "context.h"
 #include "plugin_registry.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include "color-conversion/colorconversion.h"
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/codecs/hevc_boxes.cc 
new/libheif-1.20.2/libheif/codecs/hevc_boxes.cc
--- old/libheif-1.20.1/libheif/codecs/hevc_boxes.cc     2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/codecs/hevc_boxes.cc     2025-08-05 
12:30:32.000000000 +0200
@@ -31,7 +31,7 @@
 #include <string>
 #include <utility>
 #include <algorithm>
-#include <libheif/api_structs.h>
+#include "api_structs.h"
 
 
 Error HEVCDecoderConfigurationRecord::parse(BitstreamRange& range, const 
heif_security_limits* limits)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/codecs/hevc_enc.cc 
new/libheif-1.20.2/libheif/codecs/hevc_enc.cc
--- old/libheif-1.20.1/libheif/codecs/hevc_enc.cc       2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/codecs/hevc_enc.cc       2025-08-05 
12:30:32.000000000 +0200
@@ -22,7 +22,7 @@
 #include "hevc_boxes.h"
 #include "error.h"
 #include "context.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 
 #include <string>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/codecs/jpeg2000_boxes.cc 
new/libheif-1.20.2/libheif/codecs/jpeg2000_boxes.cc
--- old/libheif-1.20.1/libheif/codecs/jpeg2000_boxes.cc 2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/codecs/jpeg2000_boxes.cc 2025-08-05 
12:30:32.000000000 +0200
@@ -19,7 +19,7 @@
  */
 
 #include "jpeg2000_boxes.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include <cstdint>
 #include <iostream>
 #include <cstdio>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/codecs/jpeg2000_enc.cc 
new/libheif-1.20.2/libheif/codecs/jpeg2000_enc.cc
--- old/libheif-1.20.1/libheif/codecs/jpeg2000_enc.cc   2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/codecs/jpeg2000_enc.cc   2025-08-05 
12:30:32.000000000 +0200
@@ -22,7 +22,7 @@
 #include "jpeg2000_boxes.h"
 #include "error.h"
 #include "context.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 
 #include <string>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/codecs/jpeg_enc.cc 
new/libheif-1.20.2/libheif/codecs/jpeg_enc.cc
--- old/libheif-1.20.1/libheif/codecs/jpeg_enc.cc       2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/codecs/jpeg_enc.cc       2025-08-05 
12:30:32.000000000 +0200
@@ -22,7 +22,7 @@
 #include "jpeg_boxes.h"
 #include "error.h"
 #include "context.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include <cstring>
 
 #include <string>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libheif-1.20.1/libheif/codecs/uncompressed/unc_boxes.cc 
new/libheif-1.20.2/libheif/codecs/uncompressed/unc_boxes.cc
--- old/libheif-1.20.1/libheif/codecs/uncompressed/unc_boxes.cc 2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/codecs/uncompressed/unc_boxes.cc 2025-08-05 
12:30:32.000000000 +0200
@@ -135,7 +135,7 @@
 
   if (limits->max_components && component_count > limits->max_components) {
     std::stringstream sstr;
-    sstr << "cmpd box should countain " << component_count << " components, 
but security limit is set to "
+    sstr << "cmpd box should contain " << component_count << " components, but 
security limit is set to "
          << limits->max_components << " components";
 
     return {heif_error_Invalid_input,
@@ -147,7 +147,7 @@
   for (unsigned int i = 0; i < component_count ; i++) {
     if (range.eof()) {
       std::stringstream sstr;
-      sstr << "cmpd box should countain " << component_count << " components, 
but box only contained "
+      sstr << "cmpd box should contain " << component_count << " components, 
but box only contained "
            << i << " components";
 
       return {heif_error_Invalid_input,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libheif-1.20.1/libheif/codecs/uncompressed/unc_enc.cc 
new/libheif-1.20.2/libheif/codecs/uncompressed/unc_enc.cc
--- old/libheif-1.20.1/libheif/codecs/uncompressed/unc_enc.cc   2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/codecs/uncompressed/unc_enc.cc   2025-08-05 
12:30:32.000000000 +0200
@@ -22,7 +22,7 @@
 #include "unc_boxes.h"
 #include "error.h"
 #include "context.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include <cstring>
 #include <image-items/unc_image.h>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/codecs/vvc_boxes.cc 
new/libheif-1.20.2/libheif/codecs/vvc_boxes.cc
--- old/libheif-1.20.1/libheif/codecs/vvc_boxes.cc      2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/codecs/vvc_boxes.cc      2025-08-05 
12:30:32.000000000 +0200
@@ -25,7 +25,7 @@
 #include <cassert>
 #include <iomanip>
 #include <utility>
-#include <libheif/api_structs.h>
+#include "api_structs.h"
 
 
 Error Box_vvcC::parse(BitstreamRange& range, const heif_security_limits* 
limits)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/codecs/vvc_enc.cc 
new/libheif-1.20.2/libheif/codecs/vvc_enc.cc
--- old/libheif-1.20.1/libheif/codecs/vvc_enc.cc        2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/codecs/vvc_enc.cc        2025-08-05 
12:30:32.000000000 +0200
@@ -22,7 +22,7 @@
 #include "vvc_boxes.h"
 #include "error.h"
 #include "context.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 
 #include <string>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/context.cc 
new/libheif-1.20.2/libheif/context.cc
--- old/libheif-1.20.1/libheif/context.cc       2025-07-02 15:05:31.000000000 
+0200
+++ new/libheif-1.20.2/libheif/context.cc       2025-08-05 12:30:32.000000000 
+0200
@@ -45,7 +45,7 @@
 #include "context.h"
 #include "file.h"
 #include "pixelimage.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include "security_limits.h"
 #include "compression.h"
 #include "color-conversion/colorconversion.h"
@@ -559,9 +559,10 @@
         uint32_t width = ispe->get_width();
         uint32_t height = ispe->get_height();
 
-        Error sizeError = check_for_valid_image_size(get_security_limits(), 
width, height);
-        if (sizeError) {
-          return sizeError;
+        if (width == 0 || height == 0) {
+          return {heif_error_Invalid_input,
+                  heif_suberror_Invalid_image_size,
+                  "Zero image width or height"};
         }
 
         image->set_resolution(width, height);
@@ -1726,6 +1727,11 @@
   auto tracks = moov->get_child_boxes<Box_trak>();
   for (const auto& track_box : tracks) {
     auto track = Track::alloc_track(this, track_box);
+    if (!track) {
+      return {heif_error_Invalid_input,
+              heif_suberror_Unspecified,
+              "Unknown track handler or track error"};
+    }
     m_tracks.insert({track->get_id(), track});
 
     if (track->is_visual_track()) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/error.cc 
new/libheif-1.20.2/libheif/error.cc
--- old/libheif-1.20.1/libheif/error.cc 2025-07-02 15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/error.cc 2025-08-05 12:30:32.000000000 +0200
@@ -48,6 +48,15 @@
 }
 
 
+// Replacement for C++20 std::string::starts_with()
+static bool starts_with(const std::string& str, const std::string& prefix) {
+    if (str.length() < prefix.length()) {
+        return false;
+    }
+    return str.rfind(prefix, 0) == 0;
+}
+
+
 Error Error::from_heif_error(const heif_error& c_error)
 {
   // unpack the concatenated error message and extract the last part only
@@ -56,17 +65,17 @@
   const char* sub_err_string = get_error_string(c_error.subcode);
 
   std::string msg = c_error.message;
-  if (msg.starts_with(err_string)) {
+  if (starts_with(msg, err_string)) {
     msg = msg.substr(strlen(err_string));
 
-    if (msg.starts_with(": ")) {
+    if (starts_with(msg, ": ")) {
       msg = msg.substr(2);
     }
 
-    if (msg.starts_with(sub_err_string)) {
+    if (starts_with(msg, sub_err_string)) {
       msg = msg.substr(strlen(sub_err_string));
 
-      if (msg.starts_with(": ")) {
+      if (starts_with(msg, ": ")) {
         msg = msg.substr(2);
       }
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/image-items/avif.cc 
new/libheif-1.20.2/libheif/image-items/avif.cc
--- old/libheif-1.20.1/libheif/image-items/avif.cc      2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/image-items/avif.cc      2025-08-05 
12:30:32.000000000 +0200
@@ -25,7 +25,7 @@
 #include "codecs/avif_boxes.h"
 #include "bitstream.h"
 #include "common_utils.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include "file.h"
 #include <iomanip>
 #include <limits>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/image-items/grid.cc 
new/libheif-1.20.2/libheif/image-items/grid.cc
--- old/libheif-1.20.1/libheif/image-items/grid.cc      2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/image-items/grid.cc      2025-08-05 
12:30:32.000000000 +0200
@@ -26,7 +26,7 @@
 #include <future>
 #include <set>
 #include <algorithm>
-#include <libheif/api_structs.h>
+#include "api_structs.h"
 #include "security_limits.h"
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/image-items/hevc.cc 
new/libheif-1.20.2/libheif/image-items/hevc.cc
--- old/libheif-1.20.1/libheif/image-items/hevc.cc      2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/image-items/hevc.cc      2025-08-05 
12:30:32.000000000 +0200
@@ -31,7 +31,7 @@
 #include <iomanip>
 #include <string>
 #include <utility>
-#include "api/libheif/api_structs.h"
+#include "api_structs.h"
 #include "codecs/hevc_enc.h"
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/image-items/image_item.cc 
new/libheif-1.20.2/libheif/image-items/image_item.cc
--- old/libheif-1.20.1/libheif/image-items/image_item.cc        2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/image-items/image_item.cc        2025-08-05 
12:30:32.000000000 +0200
@@ -33,7 +33,7 @@
 #include "tiled.h"
 #include "codecs/decoder.h"
 #include "color-conversion/colorconversion.h"
-#include "api/libheif/api_structs.h"
+#include "api_structs.h"
 #include "plugin_registry.h"
 #include "security_limits.h"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/image-items/jpeg.cc 
new/libheif-1.20.2/libheif/image-items/jpeg.cc
--- old/libheif-1.20.1/libheif/image-items/jpeg.cc      2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/image-items/jpeg.cc      2025-08-05 
12:30:32.000000000 +0200
@@ -24,7 +24,7 @@
 #include "codecs/jpeg_boxes.h"
 #include "security_limits.h"
 #include "pixelimage.h"
-#include "api/libheif/api_structs.h"
+#include "api_structs.h"
 #include <cstring>
 #include <utility>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/image-items/jpeg2000.cc 
new/libheif-1.20.2/libheif/image-items/jpeg2000.cc
--- old/libheif-1.20.1/libheif/image-items/jpeg2000.cc  2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/image-items/jpeg2000.cc  2025-08-05 
12:30:32.000000000 +0200
@@ -19,7 +19,7 @@
  */
 
 #include "jpeg2000.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include "codecs/jpeg2000_dec.h"
 #include "codecs/jpeg2000_enc.h"
 #include "codecs/jpeg2000_boxes.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/image-items/tiled.cc 
new/libheif-1.20.2/libheif/image-items/tiled.cc
--- old/libheif-1.20.1/libheif/image-items/tiled.cc     2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/image-items/tiled.cc     2025-08-05 
12:30:32.000000000 +0200
@@ -24,7 +24,7 @@
 #include <algorithm>
 #include "security_limits.h"
 #include "codecs/hevc_dec.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 
 
 static uint64_t readvec(const std::vector<uint8_t>& data, size_t& ptr, int len)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/image-items/vvc.cc 
new/libheif-1.20.2/libheif/image-items/vvc.cc
--- old/libheif-1.20.1/libheif/image-items/vvc.cc       2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/image-items/vvc.cc       2025-08-05 
12:30:32.000000000 +0200
@@ -25,7 +25,7 @@
 #include <cstring>
 #include <string>
 #include <cassert>
-#include "api/libheif/api_structs.h"
+#include "api_structs.h"
 #include <utility>
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/plugins/encoder_openjpeg.cc 
new/libheif-1.20.2/libheif/plugins/encoder_openjpeg.cc
--- old/libheif-1.20.1/libheif/plugins/encoder_openjpeg.cc      2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/plugins/encoder_openjpeg.cc      2025-08-05 
12:30:32.000000000 +0200
@@ -341,7 +341,7 @@
 // @param src_data_raw - Newly encoded bytes provided by OpenJPEG
 // @param nb_bytes - The number of bytes or size of src_data_raw
 // @param encoder_raw - Out the new
-// @return - The number of bytes successfuly transfered
+// @return - The number of bytes successfully transferred
 static OPJ_SIZE_T opj_write_from_buffer(void* src_data_raw, OPJ_SIZE_T 
nb_bytes, void* encoder_raw)
 {
   uint8_t* src_data = (uint8_t*) src_data_raw;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/sequences/seq_boxes.cc 
new/libheif-1.20.2/libheif/sequences/seq_boxes.cc
--- old/libheif-1.20.1/libheif/sequences/seq_boxes.cc   2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/sequences/seq_boxes.cc   2025-08-05 
12:30:32.000000000 +0200
@@ -135,7 +135,7 @@
   if (get_version() == 1) {
     writer.write64(m_creation_time);
     writer.write64(m_modification_time);
-    writer.write64(m_timescale);
+    writer.write32(m_timescale);
     writer.write64(m_duration);
   }
   else {
@@ -219,6 +219,10 @@
 {
   std::ostringstream sstr;
   sstr << FullBox::dump(indent);
+  sstr << indent << "track enabled: " << ((get_flags() & Track_enabled) ? 
"yes" : "no") << "\n"
+       << indent << "track in movie: " << ((get_flags() & Track_in_movie) ? 
"yes" : "no") << "\n"
+       << indent << "track in preview: " << ((get_flags() & Track_in_preview) 
? "yes" : "no") << "\n"
+       << indent << "track size is aspect ratio: " << ((get_flags() & 
Track_size_is_aspect_ratio) ? "yes" : "no") << "\n";
   sstr << indent << "creation time:     " << m_creation_time << "\n"
       << indent << "modification time: " << m_modification_time << "\n"
       << indent << "track ID: " << m_track_id << "\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/sequences/seq_boxes.h 
new/libheif-1.20.2/libheif/sequences/seq_boxes.h
--- old/libheif-1.20.1/libheif/sequences/seq_boxes.h    2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/sequences/seq_boxes.h    2025-08-05 
12:30:32.000000000 +0200
@@ -116,8 +116,18 @@
   Box_tkhd()
   {
     set_short_type(fourcc("tkhd"));
+
+    // set default flags according to ISO 14496-12
+    set_flags(Track_enabled | Track_in_movie | Track_in_preview);
   }
 
+  enum Flags {
+    Track_enabled = 0x01,
+    Track_in_movie = 0x02,
+    Track_in_preview = 0x04,
+    Track_size_is_aspect_ratio = 0x08
+  };
+
   std::string dump(Indent&) const override;
 
   const char* debug_box_name() const override { return "Track Header"; }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/sequences/track.cc 
new/libheif-1.20.2/libheif/sequences/track.cc
--- old/libheif-1.20.1/libheif/sequences/track.cc       2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/sequences/track.cc       2025-08-05 
12:30:32.000000000 +0200
@@ -25,7 +25,7 @@
 #include "sequences/chunk.h"
 #include "sequences/track_visual.h"
 #include "sequences/track_metadata.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include <limits>
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/sequences/track.h 
new/libheif-1.20.2/libheif/sequences/track.h
--- old/libheif-1.20.1/libheif/sequences/track.h        2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/sequences/track.h        2025-08-05 
12:30:32.000000000 +0200
@@ -22,7 +22,7 @@
 #define LIBHEIF_TRACK_H
 
 #include "error.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include "libheif/heif_plugin.h"
 #include "libheif/heif_sequences.h"
 #include <string>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/sequences/track_metadata.cc 
new/libheif-1.20.2/libheif/sequences/track_metadata.cc
--- old/libheif-1.20.1/libheif/sequences/track_metadata.cc      2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/sequences/track_metadata.cc      2025-08-05 
12:30:32.000000000 +0200
@@ -21,7 +21,7 @@
 #include "track_metadata.h"
 #include "chunk.h"
 #include "context.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include <utility>
 
 
@@ -30,6 +30,11 @@
 {
   const std::vector<uint32_t>& chunk_offsets = m_stco->get_offsets();
 
+  // Metadata tracks are not meant for display
+
+  m_tkhd->set_flags(m_tkhd->get_flags() & ~(Box_tkhd::Flags::Track_in_movie |
+                                            
Box_tkhd::Flags::Track_in_preview));
+
   // Find sequence resolution
 
   if (!chunk_offsets.empty())  {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/libheif/sequences/track_visual.cc 
new/libheif-1.20.2/libheif/sequences/track_visual.cc
--- old/libheif-1.20.1/libheif/sequences/track_visual.cc        2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/libheif/sequences/track_visual.cc        2025-08-05 
12:30:32.000000000 +0200
@@ -24,7 +24,7 @@
 #include "chunk.h"
 #include "pixelimage.h"
 #include "context.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include "codecs/hevc_boxes.h"
 
 
@@ -111,7 +111,6 @@
 
   // --- read sample auxiliary data
 
-#if HEIF_ENABLE_EXPERIMENTAL_FEATURES
   if (m_aux_reader_content_ids) {
     auto readResult = 
m_aux_reader_content_ids->get_sample_info(get_file().get(), 
m_next_sample_to_be_processed);
     if (readResult.error) {
@@ -125,7 +124,6 @@
 
     image->set_gimi_sample_content_id(convResult.value);
   }
-#endif
 
   if (m_aux_reader_tai_timestamps) {
     auto readResult = 
m_aux_reader_tai_timestamps->get_sample_info(get_file().get(), 
m_next_sample_to_be_processed);
@@ -222,11 +220,7 @@
                                 colorConvertedImage->get_sample_duration(),
                                 data.is_sync_frame,
                                 image->get_tai_timestamp(),
-#if HEIF_ENABLE_EXPERIMENTAL_FEATURES
                                 image->has_gimi_sample_content_id() ? 
image->get_gimi_sample_content_id() : std::string{});
-#else
-  std::string{});
-#endif
 
   if (err) {
     return err;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/post.js new/libheif-1.20.2/post.js
--- old/libheif-1.20.1/post.js  2025-07-02 15:05:31.000000000 +0200
+++ new/libheif-1.20.2/post.js  2025-08-05 12:30:32.000000000 +0200
@@ -53,6 +53,14 @@
     return !!Module.heif_image_handle_is_primary_image(this.handle);
 }
 
+HeifImage.prototype.has_alpha_channel = function() {
+    return !!Module.heif_image_handle_has_alpha_channel(this.handle);
+}
+
+HeifImage.prototype.is_premultiplied_alpha = function() {
+    return !!Module.heif_image_handle_is_premultiplied_alpha(this.handle);
+}
+
 HeifImage.prototype.display = function(image_data, callback) {
     // Defer color conversion.
     var w = this.get_width();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/tests/catch_amalgamated.cpp 
new/libheif-1.20.2/tests/catch_amalgamated.cpp
--- old/libheif-1.20.1/tests/catch_amalgamated.cpp      2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/tests/catch_amalgamated.cpp      2025-08-05 
12:30:32.000000000 +0200
@@ -6513,7 +6513,7 @@
         std::string origStr = CATCH_MOVE(str);
         str.clear();
         // There is at least one replacement, so reserve with the best guess
-        // we can make without actually counting the number of occurences.
+        // we can make without actually counting the number of occurrences.
         str.reserve(origStr.size() - replaceThis.size() + withThis.size());
         do {
             str.append(origStr, copyBegin, i-copyBegin );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/tests/catch_amalgamated.hpp 
new/libheif-1.20.2/tests/catch_amalgamated.hpp
--- old/libheif-1.20.1/tests/catch_amalgamated.hpp      2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/tests/catch_amalgamated.hpp      2025-08-05 
12:30:32.000000000 +0200
@@ -5173,7 +5173,7 @@
  *    when the compiler handles `ExprLhs<T> == b`, it also tries to resolve
  *    the overload set for `b == ExprLhs<T>`.
  *
- * To accomodate these use cases, decomposer ended up rather complex.
+ * To accommodate these use cases, decomposer ended up rather complex.
  *
  * 1) These types are handled by adding SFINAE overloads to our comparison
  *    operators, checking whether `T == U` are comparable with the given
@@ -5291,7 +5291,7 @@
     public:
         constexpr auto isBinaryExpression() const -> bool { return 
m_isBinaryExpression; }
         constexpr auto getResult() const -> bool { return m_result; }
-        //! This function **has** to be overriden by the derived class.
+        //! This function **has** to be overridden by the derived class.
         virtual void streamReconstructedExpression( std::ostream& os ) const;
 
         constexpr ITransientExpression( bool isBinaryExpression, bool result )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/tests/encode.cc 
new/libheif-1.20.2/tests/encode.cc
--- old/libheif-1.20.1/tests/encode.cc  2025-07-02 15:05:31.000000000 +0200
+++ new/libheif-1.20.2/tests/encode.cc  2025-08-05 12:30:32.000000000 +0200
@@ -27,7 +27,7 @@
 #include "catch_amalgamated.hpp"
 #include "libheif/heif.h"
 #include "pixelimage.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include "test_utils.h"
 
 #include <string.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/tests/encode_htj2k.cc 
new/libheif-1.20.2/tests/encode_htj2k.cc
--- old/libheif-1.20.1/tests/encode_htj2k.cc    2025-07-02 15:05:31.000000000 
+0200
+++ new/libheif-1.20.2/tests/encode_htj2k.cc    2025-08-05 12:30:32.000000000 
+0200
@@ -26,7 +26,7 @@
 
 #include "catch_amalgamated.hpp"
 #include "libheif/heif.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include "pixelimage.h"
 
 #include "test_utils.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/tests/encode_jpeg2000.cc 
new/libheif-1.20.2/tests/encode_jpeg2000.cc
--- old/libheif-1.20.1/tests/encode_jpeg2000.cc 2025-07-02 15:05:31.000000000 
+0200
+++ new/libheif-1.20.2/tests/encode_jpeg2000.cc 2025-08-05 12:30:32.000000000 
+0200
@@ -26,7 +26,7 @@
 
 #include "catch_amalgamated.hpp"
 #include "libheif/heif.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include "pixelimage.h"
 
 #include "test_utils.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/tests/extended_type.cc 
new/libheif-1.20.2/tests/extended_type.cc
--- old/libheif-1.20.1/tests/extended_type.cc   2025-07-02 15:05:31.000000000 
+0200
+++ new/libheif-1.20.2/tests/extended_type.cc   2025-08-05 12:30:32.000000000 
+0200
@@ -25,7 +25,7 @@
 */
 
 #include "catch_amalgamated.hpp"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include "libheif/heif.h"
 #include "test-config.h"
 #include "test_utils.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/tests/file_layout.cc 
new/libheif-1.20.2/tests/file_layout.cc
--- old/libheif-1.20.1/tests/file_layout.cc     2025-07-02 15:05:31.000000000 
+0200
+++ new/libheif-1.20.2/tests/file_layout.cc     2025-08-05 12:30:32.000000000 
+0200
@@ -25,7 +25,7 @@
 */
 #include "catch_amalgamated.hpp"
 #include "libheif/heif.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include <cstdint>
 #include <stdio.h>
 #include "test_utils.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/tests/mini_decode.cc 
new/libheif-1.20.2/tests/mini_decode.cc
--- old/libheif-1.20.1/tests/mini_decode.cc     2025-07-02 15:05:31.000000000 
+0200
+++ new/libheif-1.20.2/tests/mini_decode.cc     2025-08-05 12:30:32.000000000 
+0200
@@ -25,7 +25,7 @@
 */
 #include "catch_amalgamated.hpp"
 #include "libheif/heif.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include <cstdint>
 #include <stdio.h>
 #include "test_utils.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/tests/region.cc 
new/libheif-1.20.2/tests/region.cc
--- old/libheif-1.20.1/tests/region.cc  2025-07-02 15:05:31.000000000 +0200
+++ new/libheif-1.20.2/tests/region.cc  2025-08-05 12:30:32.000000000 +0200
@@ -25,7 +25,7 @@
 */
 
 #include "catch_amalgamated.hpp"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include "libheif/heif.h"
 #include "test-config.h"
 #include "test_utils.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/tests/tai.cc 
new/libheif-1.20.2/tests/tai.cc
--- old/libheif-1.20.1/tests/tai.cc     2025-07-02 15:05:31.000000000 +0200
+++ new/libheif-1.20.2/tests/tai.cc     2025-08-05 12:30:32.000000000 +0200
@@ -33,6 +33,9 @@
 {
   heif_error err{};
 
+  err = heif_init(nullptr);
+  REQUIRE(err.code == heif_error_Ok);
+
   std::string filename = get_tests_output_file_path("tai-1.heic");
 
   heif_image* img = createImage_RGB_planar();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/tests/uncompressed_decode.cc 
new/libheif-1.20.2/tests/uncompressed_decode.cc
--- old/libheif-1.20.1/tests/uncompressed_decode.cc     2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/tests/uncompressed_decode.cc     2025-08-05 
12:30:32.000000000 +0200
@@ -25,7 +25,7 @@
 */
 #include "catch_amalgamated.hpp"
 #include "libheif/heif.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include <cstdint>
 #include <stdio.h>
 #include "test_utils.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libheif-1.20.1/tests/uncompressed_decode_generic_compression.cc 
new/libheif-1.20.2/tests/uncompressed_decode_generic_compression.cc
--- old/libheif-1.20.1/tests/uncompressed_decode_generic_compression.cc 
2025-07-02 15:05:31.000000000 +0200
+++ new/libheif-1.20.2/tests/uncompressed_decode_generic_compression.cc 
2025-08-05 12:30:32.000000000 +0200
@@ -25,7 +25,7 @@
 */
 #include "catch_amalgamated.hpp"
 #include "libheif/heif.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include <cstdint>
 #include <stdio.h>
 #include "test_utils.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/tests/uncompressed_decode_mono.cc 
new/libheif-1.20.2/tests/uncompressed_decode_mono.cc
--- old/libheif-1.20.1/tests/uncompressed_decode_mono.cc        2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/tests/uncompressed_decode_mono.cc        2025-08-05 
12:30:32.000000000 +0200
@@ -25,7 +25,7 @@
 */
 #include "catch_amalgamated.hpp"
 #include "libheif/heif.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include <cstdint>
 #include <stdio.h>
 #include "test_utils.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/tests/uncompressed_decode_rgb.cc 
new/libheif-1.20.2/tests/uncompressed_decode_rgb.cc
--- old/libheif-1.20.1/tests/uncompressed_decode_rgb.cc 2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/tests/uncompressed_decode_rgb.cc 2025-08-05 
12:30:32.000000000 +0200
@@ -25,7 +25,7 @@
 */
 #include "catch_amalgamated.hpp"
 #include "libheif/heif.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include <cstdint>
 #include <stdio.h>
 #include "test_utils.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/tests/uncompressed_decode_rgb16.cc 
new/libheif-1.20.2/tests/uncompressed_decode_rgb16.cc
--- old/libheif-1.20.1/tests/uncompressed_decode_rgb16.cc       2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/tests/uncompressed_decode_rgb16.cc       2025-08-05 
12:30:32.000000000 +0200
@@ -26,7 +26,7 @@
 
 #include "catch_amalgamated.hpp"
 #include "libheif/heif.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include <cstdint>
 #include <stdio.h>
 #include "test_utils.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/tests/uncompressed_decode_rgb565.cc 
new/libheif-1.20.2/tests/uncompressed_decode_rgb565.cc
--- old/libheif-1.20.1/tests/uncompressed_decode_rgb565.cc      2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/tests/uncompressed_decode_rgb565.cc      2025-08-05 
12:30:32.000000000 +0200
@@ -26,7 +26,7 @@
 
 #include "catch_amalgamated.hpp"
 #include "libheif/heif.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include <cstdint>
 #include <stdio.h>
 #include "test_utils.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/tests/uncompressed_decode_rgb7.cc 
new/libheif-1.20.2/tests/uncompressed_decode_rgb7.cc
--- old/libheif-1.20.1/tests/uncompressed_decode_rgb7.cc        2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/tests/uncompressed_decode_rgb7.cc        2025-08-05 
12:30:32.000000000 +0200
@@ -26,7 +26,7 @@
 
 #include "catch_amalgamated.hpp"
 #include "libheif/heif.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include <cstdint>
 #include <stdio.h>
 #include "test_utils.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/tests/uncompressed_decode_ycbcr.cc 
new/libheif-1.20.2/tests/uncompressed_decode_ycbcr.cc
--- old/libheif-1.20.1/tests/uncompressed_decode_ycbcr.cc       2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/tests/uncompressed_decode_ycbcr.cc       2025-08-05 
12:30:32.000000000 +0200
@@ -25,7 +25,7 @@
 */
 #include "catch_amalgamated.hpp"
 #include "libheif/heif.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include <cstdint>
 #include <stdio.h>
 #include "test_utils.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/tests/uncompressed_decode_ycbcr420.cc 
new/libheif-1.20.2/tests/uncompressed_decode_ycbcr420.cc
--- old/libheif-1.20.1/tests/uncompressed_decode_ycbcr420.cc    2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/tests/uncompressed_decode_ycbcr420.cc    2025-08-05 
12:30:32.000000000 +0200
@@ -25,7 +25,7 @@
 */
 #include "catch_amalgamated.hpp"
 #include "libheif/heif.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include <cstdint>
 #include <stdio.h>
 #include "test_utils.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/tests/uncompressed_decode_ycbcr422.cc 
new/libheif-1.20.2/tests/uncompressed_decode_ycbcr422.cc
--- old/libheif-1.20.1/tests/uncompressed_decode_ycbcr422.cc    2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/tests/uncompressed_decode_ycbcr422.cc    2025-08-05 
12:30:32.000000000 +0200
@@ -25,7 +25,7 @@
 */
 #include "catch_amalgamated.hpp"
 #include "libheif/heif.h"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include <cstdint>
 #include <stdio.h>
 #include "test_utils.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libheif-1.20.1/tests/uncompressed_encode.cc 
new/libheif-1.20.2/tests/uncompressed_encode.cc
--- old/libheif-1.20.1/tests/uncompressed_encode.cc     2025-07-02 
15:05:31.000000000 +0200
+++ new/libheif-1.20.2/tests/uncompressed_encode.cc     2025-08-05 
12:30:32.000000000 +0200
@@ -25,7 +25,7 @@
 */
 
 #include "catch_amalgamated.hpp"
-#include "libheif/api_structs.h"
+#include "api_structs.h"
 #include "libheif/heif.h"
 #include <cstdint>
 #include <string.h>

Reply via email to