#631 New way of forcing profile activation + guarding all invocations of ICC_Profile.getInstance()

This commit is contained in:
Harald Kuhr
2021-12-11 18:13:07 +01:00
parent 3911191b04
commit b2c5915db8
9 changed files with 337 additions and 93 deletions

View File

@@ -287,7 +287,7 @@ final class WebPImageReader extends ImageReaderBase {
long chunkStart = imageInput.getStreamPosition();
if (nextChunk == WebP.CHUNK_ICCP) {
iccProfile = ICC_Profile.getInstance(IIOUtil.createStreamAdapter(imageInput, chunkLength));
iccProfile = ColorSpaces.readProfile(IIOUtil.createStreamAdapter(imageInput, chunkLength));
}
else {
processWarningOccurred(String.format("Expected 'ICCP' chunk, '%s' chunk encountered", fourCC(nextChunk)));