mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-04 20:15:28 -04:00
Clean-up after pull.
This commit is contained in:
parent
af245a80d9
commit
63d9029a3e
@ -48,7 +48,7 @@ public class TargaImageReaderSpi extends JMagickImageReaderSpiSupport {
|
||||
);
|
||||
}
|
||||
|
||||
boolean canDecode(ImageInputStream pSource) throws IOException {
|
||||
boolean canDecode(final ImageInputStream pSource) throws IOException {
|
||||
// // TODO: Targa 1989 signature look like (bytes 8-23 of 26 LAST bytes):
|
||||
// // 'T', 'R', 'U', 'E', 'V', 'I', 'S', 'I', 'O', 'N', '-', 'X', 'F', 'I', 'L', 'E'
|
||||
// // Targa 1987:
|
||||
@ -63,11 +63,13 @@ public class TargaImageReaderSpi extends JMagickImageReaderSpiSupport {
|
||||
// new byte[] {-1, 0x01, 0x20}, // Type 31: Compressed CM
|
||||
// new byte[] {-1, 0x01, 0x21}, // Type 32: Compressed CM, 4 pass
|
||||
// },
|
||||
try {
|
||||
pSource.seek(pSource.length() - 18);
|
||||
} catch (IndexOutOfBoundsException e) {
|
||||
|
||||
// If we don't know the stream length, just give up, as the Targa format has trailing magic bytes...
|
||||
if (pSource.length() < 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
pSource.seek(pSource.length() - 18);
|
||||
byte[] magic = new byte[18];
|
||||
pSource.readFully(magic);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user