Commit f02501ea for libheif

commit f02501ea5a6b172ca222034e076bb65754df2069
Author: Dirk Farin <dirk.farin@gmail.com>
Date:   Tue Apr 7 21:40:29 2026 +0200

    unci: register types of non-coded components

diff --git a/libheif/pixelimage.cc b/libheif/pixelimage.cc
index 0ed8229b..42e77502 100644
--- a/libheif/pixelimage.cc
+++ b/libheif/pixelimage.cc
@@ -2344,6 +2344,14 @@ Result<uint32_t> HeifPixelImage::add_component(uint32_t width, uint32_t height,
 }


+uint32_t HeifPixelImage::add_component_without_data(uint16_t component_type)
+{
+  uint32_t new_component_id = m_next_component_id++;
+  m_component_types[new_component_id] = component_type;
+  return new_component_id;
+}
+
+
 #if 0
 Result<uint32_t> HeifPixelImage::add_component_for_index(uint32_t component_index,
                                                           uint32_t width, uint32_t height,
diff --git a/libheif/pixelimage.h b/libheif/pixelimage.h
index e49aaa51..1b46fe31 100644
--- a/libheif/pixelimage.h
+++ b/libheif/pixelimage.h
@@ -248,9 +248,6 @@ public:

   virtual void set_bayer_pattern(const BayerPattern& pattern) { m_bayer_pattern = pattern; }

-  // TODO: replace uint16_t component_type with class that also handled the std::string type
-  uint32_t add_component_without_data(uint16_t component_type) { assert(false); /*TODO*/ }
-

   // --- polarization pattern

@@ -485,6 +482,9 @@ public:
                                  heif_component_datatype datatype, int bit_depth,
                                  const heif_security_limits* limits);

+  // TODO: replace uint16_t component_type with class that also handled the std::string type
+  uint32_t add_component_without_data(uint16_t component_type);
+
   // Decoder path: uses a pre-populated cmpd table to look up the component type.
 #if 0
   Result<uint32_t> add_component_for_index(uint32_t component_index,