mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-05 04:25:29 -04:00
TMI-18: Preliminary fix for images get inverted colors.
This commit is contained in:
parent
f940fed152
commit
08b5891298
@ -89,8 +89,8 @@ final class JPEGSegmentImageInputStream extends ImageInputStreamImpl {
|
|||||||
long realPosition = stream.getStreamPosition();
|
long realPosition = stream.getStreamPosition();
|
||||||
int marker = stream.readUnsignedShort();
|
int marker = stream.readUnsignedShort();
|
||||||
|
|
||||||
// TODO: Refactor to make various segments optional, we probably only want the "Adobe" APP14 segment
|
// TODO: Refactor to make various segments optional, we probably only want the "Adobe" APP14 segment, 'Exif' APP1 and very few others
|
||||||
if (isAppSegmentMarker(marker) && marker != JPEG.APP0 && marker != JPEG.APP14) {
|
if (isAppSegmentMarker(marker) && marker != JPEG.APP0 && marker != JPEG.APP1 && marker != JPEG.APP14) {
|
||||||
int length = stream.readUnsignedShort(); // Length including length field itself
|
int length = stream.readUnsignedShort(); // Length including length field itself
|
||||||
stream.seek(realPosition + 2 + length); // Skip marker (2) + length
|
stream.seek(realPosition + 2 + length); // Skip marker (2) + length
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user