From 31d44edbb237182e8a0f5fee586011e7aa821c66 Mon Sep 17 00:00:00 2001 From: Dirk Farin Date: Mon, 10 May 2021 17:28:02 +0200 Subject: [PATCH] pass decoding options from decode_image_user() to decode_image_planar() (#498) --- libheif/heif_context.cc | 8 ++++---- libheif/heif_context.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libheif/heif_context.cc b/libheif/heif_context.cc index ce4c65b102..b929412842 100644 --- a/libheif/heif_context.cc +++ b/libheif/heif_context.cc @@ -1011,7 +1011,7 @@ Error HeifContext::decode_image_user(heif_item_id ID, heif_chroma out_chroma, const struct heif_decoding_options* options) const { - Error err = decode_image_planar(ID, img, out_colorspace); + Error err = decode_image_planar(ID, img, out_colorspace, options, false); if (err) { return err; } @@ -1559,7 +1559,7 @@ Error HeifContext::decode_and_paste_tile_image(heif_item_id tileID, { std::shared_ptr tile_img; - Error err = decode_image_planar(tileID, tile_img, img->get_colorspace()); + Error err = decode_image_planar(tileID, tile_img, img->get_colorspace(), nullptr, false); if (err != Error::Ok) { return err; } @@ -1647,7 +1647,7 @@ Error HeifContext::decode_derived_image(heif_item_id ID, Error error = decode_image_planar(reference_image_id, img, - heif_colorspace_RGB); // TODO: always RGB ? + heif_colorspace_RGB, nullptr, false); // TODO: always RGB ? return error; } @@ -1724,7 +1724,7 @@ Error HeifContext::decode_overlay_image(heif_item_id ID, for (size_t i = 0; i < image_references.size(); i++) { std::shared_ptr overlay_img; err = decode_image_planar(image_references[i], overlay_img, - heif_colorspace_RGB); // TODO: always RGB? Probably yes, because of RGB background color. + heif_colorspace_RGB, nullptr, false); // TODO: always RGB? Probably yes, because of RGB background color. if (err != Error::Ok) { return err; } diff --git a/libheif/heif_context.h b/libheif/heif_context.h index 503b39a705..2b00f251db 100644 --- a/libheif/heif_context.h +++ b/libheif/heif_context.h @@ -338,8 +338,8 @@ namespace heif { Error decode_image_planar(heif_item_id ID, std::shared_ptr& img, heif_colorspace out_colorspace, - const struct heif_decoding_options* options = nullptr, - bool alphaImage = false) const; + const struct heif_decoding_options* options, + bool alphaImage) const; std::string debug_dump_boxes() const;