Param can be null in readAlpha(). Copy alphaRaster to dst in this case.

This commit is contained in:
tc-wleite 2023-03-15 11:15:17 -03:00
parent 3eabc591d8
commit 0a2efb9eac

View File

@ -560,7 +560,12 @@ final class WebPImageReader extends ImageReaderBase {
// Copy into destination raster
WritableRaster dstRaster = destination.getAlphaRaster();
VP8LDecoder.copyIntoRasterWithParams(alphaRaster, dstRaster, param);
if (param == null) {
dstRaster.setRect(alphaRaster);
}
else {
VP8LDecoder.copyIntoRasterWithParams(alphaRaster, dstRaster, param);
}
}
private int getPredictorAlpha(WritableRaster alphaRaster, int filtering, int y, int x) {