Skip to content

Commit

Permalink
forward call to get_coded_image_colorspace() in 'iden' images (fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
farindk committed Feb 18, 2025
1 parent 735765f commit 61bd38a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions libheif/image-items/iden.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,19 @@ Result<std::shared_ptr<HeifPixelImage>> ImageItem_iden::decode_compressed_image(
}


Error ImageItem_iden::get_coded_image_colorspace(heif_colorspace* out_colorspace, heif_chroma* out_chroma) const
{
heif_item_id child;
Error err = get_context()->get_id_of_non_virtual_child_image(get_id(), child);
if (err) {
return err;
}

auto image = get_context()->get_image(child, true);
return image->get_coded_image_colorspace(out_colorspace, out_chroma);
}


int ImageItem_iden::get_luma_bits_per_pixel() const
{
heif_item_id child;
Expand Down
2 changes: 2 additions & 0 deletions libheif/image-items/iden.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ class ImageItem_iden : public ImageItem

//Error on_load_file() override;

Error get_coded_image_colorspace(heif_colorspace* out_colorspace, heif_chroma* out_chroma) const override;

int get_luma_bits_per_pixel() const override;

int get_chroma_bits_per_pixel() const override;
Expand Down

0 comments on commit 61bd38a

Please sign in to comment.