#680 TGAImageReader now reads attribute bits with no extension area as alpha

This commit is contained in:
Harald Kuhr
2022-05-18 22:18:20 +02:00
parent d50fb1a51e
commit b7d865f2cf
3 changed files with 46 additions and 7 deletions
@@ -136,7 +136,7 @@ final class TGAImageReader extends ImageReaderBase {
case TGA.IMAGETYPE_TRUECOLOR_RLE:
ColorSpace sRGB = ColorSpace.getInstance(ColorSpace.CS_sRGB);
boolean hasAlpha = header.getAttributeBits() > 0 && extensions != null && extensions.hasAlpha();
boolean hasAlpha = header.getAttributeBits() > 0 && (extensions == null || extensions.hasAlpha());
boolean isAlphaPremultiplied = extensions != null && extensions.isAlphaPremultiplied();
switch (header.getPixelDepth()) {