TMI-15: Fixed some issues introduced in later JREs (at least 7u45).

This commit is contained in:
Harald Kuhr
2013-11-05 09:43:46 +01:00
parent d04c29ae12
commit f5a4fe03f4
7 changed files with 48 additions and 42 deletions

View File

@@ -28,8 +28,6 @@
package com.twelvemonkeys.imageio.plugins.iff;
import com.twelvemonkeys.image.InverseColorMapIndexColorModel;
import javax.imageio.IIOException;
import java.awt.image.BufferedImage;
import java.awt.image.IndexColorModel;
@@ -159,7 +157,7 @@ final class CMAPChunk extends IFFChunk {
// with alpha, where all colors above the original color is all transparent?
// This is a waste of time and space, of course...
int transparent = header.maskType == BMHDChunk.MASK_TRANSPARENT_COLOR ? header.transparentIndex : -1;
model = new InverseColorMapIndexColorModel(header.bitplanes, reds.length, reds, greens, blues, transparent);
model = new IndexColorModel(header.bitplanes, reds.length, reds, greens, blues, transparent); // https://github.com/haraldk/TwelveMonkeys/issues/15
}
return model;

View File

@@ -56,9 +56,9 @@ import java.util.List;
* supported by allmost all image software for the Amiga computer.
* <p/>
* This reader supports the original palette-based 1-8 bit formats, including
* EHB (Extra Halfbright), HAM (Hold and Modify), and the more recent "deep"
* EHB (Extra Half-Bright), HAM (Hold and Modify), and the more recent "deep"
* formats, 8 bit gray, 24 bit RGB and 32 bit ARGB.
* Uncompressed and ByteRun1 compressed (run lenght encoding) files are
* Uncompressed and ByteRun1 compressed (run length encoding) files are
* supported.
* <p/>
* Palette based images are read as {@code BufferedImage} of