mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-02 11:05:29 -04:00
Fixed a potential NPE.
This commit is contained in:
parent
87118aecee
commit
5accfc9cf0
@ -393,7 +393,7 @@ public class JPEGImageReader extends ImageReaderBase {
|
||||
ColorConvertOp convert = null;
|
||||
ICC_ColorSpace replacement = profile != null ? ColorSpaces.createColorSpace(profile) : null;
|
||||
|
||||
if (profile.getColorSpaceType() == ColorSpace.TYPE_GRAY && image.getColorModel().getColorSpace().getType() == ColorSpace.CS_GRAY) {
|
||||
if (profile != null && profile.getColorSpaceType() == ColorSpace.TYPE_GRAY && image.getColorModel().getColorSpace().getType() == ColorSpace.CS_GRAY) {
|
||||
// com.sun. reader does not do ColorConvertOp for CS_GRAY, even if embedded ICC profile,
|
||||
// probably because IJG native part does it already...? If applied, color looks wrong (too dark)...
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user