int posFilePointer = s.getFilePointer();
posFilePointer += jpegOffset;
s.seek(posFilePointer);
s.readFully(jpeg);
img = new Jpeg(jpeg);
}
else if (compression == TIFFConstants.COMPRESSION_JPEG) {
if (size.length > 1)
throw new IOException(MessageLocalization.getComposedMessage("compression.jpeg.is.only.supported.with.a.single.strip.this.image.has.1.strips", size.length));
byte[] jpeg = new byte[(int)size[0]];
s.seek(offset[0]);
s.readFully(jpeg);
img = new Jpeg(jpeg);
}
else {
for (int k = 0; k < offset.length; ++k) {
byte im[] = new byte[(int)size[k]];
s.seek(offset[k]);