Commit 873c208a for libheif

commit 873c208a9491cc436b9ea3914651d90f1f311b9e
Author: Dirk Farin <dirk.farin@gmail.com>
Date:   Sun May 17 20:13:34 2026 +0200

    remove heif_uncompressed_types.h header

diff --git a/heifio/decoder_raw.h b/heifio/decoder_raw.h
index 1f856757..70287b98 100644
--- a/heifio/decoder_raw.h
+++ b/heifio/decoder_raw.h
@@ -28,7 +28,7 @@
 #define LIBHEIF_DECODER_RAW_H

 #include "decoder.h"
-#include <libheif/heif_uncompressed_types.h>
+#include <libheif/heif_components.h>
 #include <string>

 struct RawImageParameters {
diff --git a/libheif/CMakeLists.txt b/libheif/CMakeLists.txt
index 38ee2d96..f104f33c 100644
--- a/libheif/CMakeLists.txt
+++ b/libheif/CMakeLists.txt
@@ -26,7 +26,6 @@ set(libheif_headers
         api/libheif/heif_tiling.h
         api/libheif/heif_components.h
         api/libheif/heif_uncompressed.h
-        api/libheif/heif_uncompressed_types.h
         api/libheif/heif_text.h
         api/libheif/heif_omaf.h
         api/libheif/heif_cxx.h
diff --git a/libheif/api/libheif/heif_components.h b/libheif/api/libheif/heif_components.h
index 47ac147b..8e472708 100644
--- a/libheif/api/libheif/heif_components.h
+++ b/libheif/api/libheif/heif_components.h
@@ -65,6 +65,30 @@ typedef struct heif_complex64
 } heif_complex64;


+// --- component types (ISO/IEC 23001-17 Table 1, used in the cmpd box)
+
+typedef enum heif_cmpd_component_type
+{
+  heif_cmpd_component_type_monochrome = 0,
+  heif_cmpd_component_type_Y = 1,
+  heif_cmpd_component_type_Cb = 2,
+  heif_cmpd_component_type_Cr = 3,
+  heif_cmpd_component_type_red = 4,
+  heif_cmpd_component_type_green = 5,
+  heif_cmpd_component_type_blue = 6,
+  heif_cmpd_component_type_alpha = 7,
+  heif_cmpd_component_type_depth = 8,
+  heif_cmpd_component_type_disparity = 9,
+  heif_cmpd_component_type_palette = 10,
+  heif_cmpd_component_type_filter_array = 11,
+  heif_cmpd_component_type_padded = 12,
+  heif_cmpd_component_type_cyan = 13,
+  heif_cmpd_component_type_magenta = 14,
+  heif_cmpd_component_type_yellow = 15,
+  heif_cmpd_component_type_key_black = 16
+} heif_cmpd_component_type;
+
+
 // --- index-based component access (operates on a decoded heif_image)

 // Returns the number of components that have pixel data (planes) in this image.
diff --git a/libheif/api/libheif/heif_encoding.h b/libheif/api/libheif/heif_encoding.h
index c875bdae..c87b849a 100644
--- a/libheif/api/libheif/heif_encoding.h
+++ b/libheif/api/libheif/heif_encoding.h
@@ -33,7 +33,11 @@ extern "C" {
 #include <libheif/heif_context.h>
 #include <libheif/heif_brands.h>
 #include <libheif/heif_color.h>
-#include <libheif/heif_uncompressed_types.h>
+
+// Forward declaration. The full definition lives in heif_uncompressed.h.
+// heif_encoding_options only stores a pointer, so a forward typedef is enough here
+// and avoids a circular include (heif_uncompressed.h pulls in heif.h, which pulls in this header).
+typedef struct heif_unci_image_parameters heif_unci_image_parameters;


 // ----- encoder -----
diff --git a/libheif/api/libheif/heif_uncompressed.h b/libheif/api/libheif/heif_uncompressed.h
index 32f93d5b..53318957 100644
--- a/libheif/api/libheif/heif_uncompressed.h
+++ b/libheif/api/libheif/heif_uncompressed.h
@@ -21,7 +21,6 @@
 #ifndef LIBHEIF_HEIF_UNCOMPRESSED_H
 #define LIBHEIF_HEIF_UNCOMPRESSED_H

-#include "libheif/heif_uncompressed_types.h"
 #include "libheif/heif_components.h"
 #include "libheif/heif_properties.h"
 #include "libheif/heif.h"
@@ -44,7 +43,39 @@ extern "C" {

 // --- 'unci' images

-// heif_unci_compression and heif_unci_image_parameters are defined in heif_uncompressed_types.h.
+// Compression methods for 'unci' (ISO 23001-17) images.
+// This is similar to heif_metadata_compression. We should try to keep the integers compatible, but each enum will just
+// contain the allowed values.
+typedef enum heif_unci_compression
+{
+  heif_unci_compression_off = 0,
+  //heif_unci_compression_auto = 1,
+  //heif_unci_compression_unknown = 2, // only used when reading unknown method from input file
+  heif_unci_compression_deflate = 3,
+  heif_unci_compression_zlib = 4,
+  heif_unci_compression_brotli = 5
+} heif_unci_compression;
+
+
+// --- 'unci' image parameters
+
+typedef struct heif_unci_image_parameters
+{
+  int version;
+
+  // --- version 1
+
+  uint32_t image_width;
+  uint32_t image_height;
+
+  uint32_t tile_width;
+  uint32_t tile_height;
+
+  heif_unci_compression compression;
+
+  // TODO: interleave type, padding
+} heif_unci_image_parameters;
+

 LIBHEIF_API
 heif_unci_image_parameters* heif_unci_image_parameters_alloc(void);
diff --git a/libheif/api/libheif/heif_uncompressed_types.h b/libheif/api/libheif/heif_uncompressed_types.h
deleted file mode 100644
index 23f0295f..00000000
--- a/libheif/api/libheif/heif_uncompressed_types.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*6
- * HEIF codec.
- * Copyright (c) 2026 Dirk Farin <dirk.farin@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 LIBHEIF_HEIF_UNCOMPRESSED_TYPES_H
-#define LIBHEIF_HEIF_UNCOMPRESSED_TYPES_H
-
-#include <stdint.h>
-
-#include "libheif/heif_components.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// --- ISO 23001-17 component types (Table 1)
-
-typedef enum heif_cmpd_component_type
-{
-  heif_cmpd_component_type_monochrome = 0,
-  heif_cmpd_component_type_Y = 1,
-  heif_cmpd_component_type_Cb = 2,
-  heif_cmpd_component_type_Cr = 3,
-  heif_cmpd_component_type_red = 4,
-  heif_cmpd_component_type_green = 5,
-  heif_cmpd_component_type_blue = 6,
-  heif_cmpd_component_type_alpha = 7,
-  heif_cmpd_component_type_depth = 8,
-  heif_cmpd_component_type_disparity = 9,
-  heif_cmpd_component_type_palette = 10,
-  heif_cmpd_component_type_filter_array = 11,
-  heif_cmpd_component_type_padded = 12,
-  heif_cmpd_component_type_cyan = 13,
-  heif_cmpd_component_type_magenta = 14,
-  heif_cmpd_component_type_yellow = 15,
-  heif_cmpd_component_type_key_black = 16
-} heif_cmpd_component_type;
-
-
-// Compression methods for 'unci' (ISO 23001-17) images.
-// This is similar to heif_metadata_compression. We should try to keep the integers compatible, but each enum will just
-// contain the allowed values.
-typedef enum heif_unci_compression
-{
-  heif_unci_compression_off = 0,
-  //heif_unci_compression_auto = 1,
-  //heif_unci_compression_unknown = 2, // only used when reading unknown method from input file
-  heif_unci_compression_deflate = 3,
-  heif_unci_compression_zlib = 4,
-  heif_unci_compression_brotli = 5
-} heif_unci_compression;
-
-
-// --- 'unci' image parameters
-
-typedef struct heif_unci_image_parameters
-{
-  int version;
-
-  // --- version 1
-
-  uint32_t image_width;
-  uint32_t image_height;
-
-  uint32_t tile_width;
-  uint32_t tile_height;
-
-  heif_unci_compression compression;
-
-  // TODO: interleave type, padding
-} heif_unci_image_parameters;
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/libheif/compression.h b/libheif/compression.h
index 95e45221..61c79766 100644
--- a/libheif/compression.h
+++ b/libheif/compression.h
@@ -25,7 +25,7 @@
 #include <cstddef>

 #include <error.h>
-#include <libheif/heif_uncompressed_types.h>
+#include <libheif/heif_uncompressed.h>

 /**
  * Convert heif_unci_compression enum to a fourcc code.