From 35976b0b33781a4b2596d2c8d72f728d55ab6487 Mon Sep 17 00:00:00 2001 From: Dirk Farin Date: Mon, 23 Sep 2024 17:50:30 +0200 Subject: [PATCH] unci: save tiles with brotli compression --- libheif/codecs/uncompressed_image.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libheif/codecs/uncompressed_image.cc b/libheif/codecs/uncompressed_image.cc index b42cb5929c..e82097667c 100644 --- a/libheif/codecs/uncompressed_image.cc +++ b/libheif/codecs/uncompressed_image.cc @@ -2078,6 +2078,9 @@ Result> ImageItem_uncompressed::add_unci else if (parameters->compression == heif_metadata_compression_zlib) { cmpC->set_compression_type(fourcc("zlib")); } + else if (parameters->compression == heif_metadata_compression_brotli) { + cmpC->set_compression_type(fourcc("brot")); + } else { assert(false); } @@ -2151,6 +2154,9 @@ Error ImageItem_uncompressed::add_image_tile(uint32_t tile_x, uint32_t tile_y, c case fourcc("zlib"): compressed_data = compress_zlib(raw_data.data(), raw_data.size()); break; + case fourcc("brot"): + compressed_data = compress_brotli(raw_data.data(), raw_data.size()); + break; default: assert(false); break;