TMI-JPEG: Simplified logic.

This commit is contained in:
Harald Kuhr 2013-04-22 21:00:33 +02:00
parent 0ffd7cacc4
commit 28d8796e54
2 changed files with 2 additions and 2 deletions

View File

@ -93,7 +93,7 @@ final class JPEGSegmentImageInputStream extends ImageInputStreamImpl {
// Skip over 0xff padding between markers
while (marker == 0xffff) {
realPosition++;
marker = (marker & 0xff) << 8 | stream.readUnsignedByte();
marker = 0xff00 | stream.readUnsignedByte();
}
// TODO: Refactor to make various segments optional, we probably only want the "Adobe" APP14 segment, 'Exif' APP1 and very few others

View File

@ -158,7 +158,7 @@ public final class JPEGSegmentUtil {
// Skip over 0xff padding between markers
while (marker == 0xffff) {
marker = (marker & 0xff) << 8 | stream.readUnsignedByte();
marker = 0xff00 | stream.readUnsignedByte();
}
if ((marker >> 8 & 0xff) != 0xff) {