Skip to content

Commit

Permalink
Removed ignoreAlpha
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Feb 8, 2025
1 parent f7f89db commit 3156816
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/_avif.c
Original file line number Diff line number Diff line change
Expand Up @@ -794,13 +794,8 @@ _decoder_get_frame(AvifDecoderObject *self, PyObject *args) {
avifRGBImageSetDefaults(&rgb, image);

rgb.depth = 8;

if (decoder->alphaPresent == AVIF_TRUE) {
rgb.format = AVIF_RGB_FORMAT_RGBA;
} else {
rgb.format = AVIF_RGB_FORMAT_RGB;
rgb.ignoreAlpha = AVIF_TRUE;
}
rgb.format =
decoder->alphaPresent == AVIF_TRUE ? AVIF_RGB_FORMAT_RGBA : AVIF_RGB_FORMAT_RGB;

result = avifRGBImageAllocatePixels(&rgb);
if (result != AVIF_RESULT_OK) {
Expand Down

0 comments on commit 3156816

Please sign in to comment.