mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-05 12:35:29 -04:00
TMI-TGA: Now compiles with Java 6.
This commit is contained in:
parent
72e3f80de6
commit
c9ba5feb43
@ -1,12 +1,11 @@
|
|||||||
package com.twelvemonkeys.imageio.plugins.tga;
|
package com.twelvemonkeys.imageio.plugins.tga;
|
||||||
|
|
||||||
import java.awt.image.IndexColorModel;
|
|
||||||
import java.io.DataInput;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
|
|
||||||
import javax.imageio.IIOException;
|
import javax.imageio.IIOException;
|
||||||
import javax.imageio.stream.ImageInputStream;
|
import javax.imageio.stream.ImageInputStream;
|
||||||
|
import java.awt.image.IndexColorModel;
|
||||||
|
import java.io.DataInput;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.nio.charset.Charset;
|
||||||
|
|
||||||
final class TGAHeader {
|
final class TGAHeader {
|
||||||
|
|
||||||
@ -125,7 +124,7 @@ final class TGAHeader {
|
|||||||
byte[] idBytes = new byte[imageIdLength];
|
byte[] idBytes = new byte[imageIdLength];
|
||||||
imageInput.readFully(idBytes);
|
imageInput.readFully(idBytes);
|
||||||
|
|
||||||
header.identification = new String(idBytes, StandardCharsets.US_ASCII);
|
header.identification = new String(idBytes, Charset.forName("US-ASCII"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Color map, not *really* part of the header
|
// Color map, not *really* part of the header
|
||||||
|
Loading…
x
Reference in New Issue
Block a user