Skip to content

Commit

Permalink
add 'rgba' profile in UncompressedImageCodec::get_heif_chroma_uncompr…
Browse files Browse the repository at this point in the history
…essed()
  • Loading branch information
farindk committed Jan 31, 2025
1 parent 51ab8db commit 05f478a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions libheif/codecs/uncompressed/unc_codec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -261,18 +261,22 @@ Error UncompressedImageCodec::get_heif_chroma_uncompressed(const std::shared_ptr

if (uncC != nullptr && uncC->get_version() == 1) {
switch (uncC->get_profile()) {
case fourcc("rgb3"): {
case fourcc("rgb3"):
*out_chroma = heif_chroma_444;
*out_colourspace = heif_colorspace_RGB;
*out_has_alpha = false;
return Error::Ok;
}
case fourcc("abgr"): {

case fourcc("abgr"):
case fourcc("rgba"):
*out_chroma = heif_chroma_444;
*out_colourspace = heif_colorspace_RGB;
*out_has_alpha = true;
return Error::Ok;
}

default:
return Error(heif_error_Unsupported_feature, heif_suberror_Unsupported_image_type,
"unci image has unsupported profile");
}
}

Expand Down

0 comments on commit 05f478a

Please sign in to comment.