Skip to content

Commit

Permalink
pass decoding options from decode_image_user() to decode_image_planar…
Browse files Browse the repository at this point in the history
…() (#498)
  • Loading branch information
farindk committed May 10, 2021
1 parent c32f155 commit 31d44ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions libheif/heif_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -1559,7 +1559,7 @@ Error HeifContext::decode_and_paste_tile_image(heif_item_id tileID,
{
std::shared_ptr<HeifPixelImage> 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;
}
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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<HeifPixelImage> 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;
}
Expand Down
4 changes: 2 additions & 2 deletions libheif/heif_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,8 @@ namespace heif {

Error decode_image_planar(heif_item_id ID, std::shared_ptr<HeifPixelImage>& 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;

Expand Down

1 comment on commit 31d44ed

@ziriax
Copy link

@ziriax ziriax commented on 31d44ed May 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, I wanted to submit my PR, but you've already committed yours. Amazing!

Please sign in to comment.