File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1373,6 +1373,8 @@ typedef struct avifDecoder
13731373 // --------------------------------------------------------------------------------------------
13741374
13751375 // Image content to decode (if present). Defaults to AVIF_IMAGE_CONTENT_DECODE_DEFAULT.
1376+ // The value is only taken into account when calling avifDecoderRead*(), avifDecoderSetSource(),
1377+ // avifDecoderParse(), or avifDecoderReset().
13761378 avifImageContentTypeFlags imageContentToDecode; // Changeable decoder setting.
13771379
13781380 // Version 1.2.0 ends here. Add any new members after this line.
Original file line number Diff line number Diff line change @@ -6952,7 +6952,10 @@ avifResult avifDecoderNextImage(avifDecoder * decoder)
69526952 AVIF_ASSERT_OR_RETURN (prepareTileResult [c ] == AVIF_RESULT_OK );
69536953 }
69546954
6955- if ((decoder -> imageContentToDecode & AVIF_IMAGE_CONTENT_COLOR_AND_ALPHA ) && decoder -> data -> meta -> sampleTransformExpression .count > 0 ) {
6955+ // If decoder->data->tileInfos[AVIF_ITEM_COLOR].tileCount == 0, it means
6956+ // decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_COLOR_AND_ALPHA was equal to 0.
6957+ // Only apply Sample Transforms if there is a color item to apply it onto.
6958+ if (decoder -> data -> tileInfos [AVIF_ITEM_COLOR ].tileCount != 0 && decoder -> data -> meta -> sampleTransformExpression .count > 0 ) {
69566959 // TODO(yguyon): Add a field in avifDecoder and only perform sample transformations upon request.
69576960 AVIF_CHECKRES (avifDecoderApplySampleTransform (decoder , decoder -> image ));
69586961 }
You can’t perform that action at this time.
0 commit comments