Skip to content

Commit

Permalink
only compile brotli support if available
Browse files Browse the repository at this point in the history
  • Loading branch information
farindk committed Sep 23, 2024
1 parent 35976b0 commit 9f09455
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libheif/codecs/uncompressed_image.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2078,9 +2078,11 @@ Result<std::shared_ptr<ImageItem_uncompressed>> ImageItem_uncompressed::add_unci
else if (parameters->compression == heif_metadata_compression_zlib) {
cmpC->set_compression_type(fourcc("zlib"));
}
#if HAVE_BROTLI
else if (parameters->compression == heif_metadata_compression_brotli) {
cmpC->set_compression_type(fourcc("brot"));
}
#endif
else {
assert(false);
}
Expand Down Expand Up @@ -2154,9 +2156,11 @@ 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;
#if HAVE_BROTLI
case fourcc("brot"):
compressed_data = compress_brotli(raw_data.data(), raw_data.size());
break;
#endif
default:
assert(false);
break;
Expand Down

0 comments on commit 9f09455

Please sign in to comment.