Skip to content

Commit

Permalink
Revert "NON-STANDARD: Allow alpha subimage items to not have an ispe …
Browse files Browse the repository at this point in the history
…property, infer ispe from color item"

This reverts commit efed118. That
commit is intended for Chrome 93 only.
  • Loading branch information
wantehchang committed Sep 3, 2021
1 parent efed118 commit ea8b7e1
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/read.c
Original file line number Diff line number Diff line change
Expand Up @@ -3101,7 +3101,7 @@ avifResult avifDecoderParse(avifDecoder * decoder)
avifDiagnosticsPrintf(data->diag, "Item ID [%u] size is too large [%ux%u]", item->id, item->width, item->height);
return AVIF_RESULT_BMFF_PARSE_FAILED;
}
} else if (!item->auxForID) { // NON-STANDARD: Allow auxiliary images to not have an ispe property. See: https://crbug.com/1245673
} else {
avifDiagnosticsPrintf(data->diag, "Item ID [%u] is missing a mandatory ispe property", item->id);
return AVIF_RESULT_BMFF_PARSE_FAILED;
}
Expand Down Expand Up @@ -3426,13 +3426,6 @@ avifResult avifDecoderReset(avifDecoder * decoder)
}

if (alphaItem) {
if (!alphaItem->width && !alphaItem->height) {
// NON-STANDARD: Alpha subimage does not have an ispe property; adopt width/height from color item
// See: https://crbug.com/1245673
alphaItem->width = colorItem->width;
alphaItem->height = colorItem->height;
}

if ((data->alphaGrid.rows > 0) && (data->alphaGrid.columns > 0)) {
if (!avifDecoderGenerateImageGridTiles(decoder, &data->alphaGrid, alphaItem, AVIF_TRUE)) {
return AVIF_RESULT_INVALID_IMAGE_GRID;
Expand Down

0 comments on commit ea8b7e1

Please sign in to comment.