// Loop through all APP2 segments, looking for something we can process.
for (byte[] app2Segment : segmentReader.getSegments(JpegSegmentReader.SEGMENT_APP2)) {
if (app2Segment.length > 10 && new String(app2Segment, 0, 11).equalsIgnoreCase("ICC_PROFILE")) {
byte[] icc = new byte[app2Segment.length-14];
System.arraycopy(app2Segment, 14, icc, 0, app2Segment.length-14);
new IccReader().extract(new ByteArrayReader(icc), metadata);
}
}
// Loop through all APPD segments, checking the leading bytes to identify the format of each.
for (byte[] appdSegment : segmentReader.getSegments(JpegSegmentReader.SEGMENT_APPD)) {