Skip to content

Commit

Permalink
unci: save tiles with brotli compression
Browse files Browse the repository at this point in the history
  • Loading branch information
farindk committed Sep 23, 2024
1 parent 8344ef0 commit 35976b0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libheif/codecs/uncompressed_image.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2078,6 +2078,9 @@ Result<std::shared_ptr<ImageItem_uncompressed>> 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);
}
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 35976b0

Please sign in to comment.