kinow commented on a change in pull request #47: IMAGING-134: Fix JPEG handling
for files encoded with RST markers
URL: https://github.com/apache/commons-imaging/pull/47#discussion_r291792699
##########
File path:
src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/JpegDecoder.java
##########
@@ -71,11 +73,23 @@ public boolean beginSOS() {
public void visitSOS(final int marker, final byte[] markerBytes, final
byte[] imageData) {
final ByteArrayInputStream is = new ByteArrayInputStream(imageData);
try {
+ // read the scan header
final int segmentLength = read2Bytes("segmentLength", is, "Not a
Valid JPEG File", getByteOrder());
final byte[] sosSegmentBytes = readBytes("SosSegment",
is, segmentLength - 2, "Not a Valid JPEG File");
sosSegment = new SosSegment(marker, sosSegmentBytes);
+ // read the payload of the scan, this is the remainder of image
data after the header
+ // the payload contains the entropy-encoded segments (or ECS)
divded by RST markers
Review comment:
s/divded/divided
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services