Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 03B79179F1 for ; Sun, 22 Feb 2015 20:54:18 +0000 (UTC) Received: (qmail 65446 invoked by uid 500); 22 Feb 2015 20:54:12 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 65353 invoked by uid 500); 22 Feb 2015 20:54:12 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 65342 invoked by uid 99); 22 Feb 2015 20:54:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 22 Feb 2015 20:54:12 +0000 Date: Sun, 22 Feb 2015 20:54:12 +0000 (UTC) From: =?utf-8?Q?Michael_Gro=C3=9F_=28JIRA=29?= To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (IMAGING-134) Invalid marker found in entropy data MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/IMAGING-134?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D143= 32359#comment-14332359 ]=20 Michael Gro=C3=9F commented on IMAGING-134: -------------------------------------- The exception is thrown from *org.apache.commons.imaging.formats.jpeg.decod= er.JpegInputStream.nextBit()* when a marker called *b2* is not 220: {noformat} org.apache.commons.imaging.formats.jpeg.JpegConstants public static final int DNL_MARKER =3D 0xFFdc; org.apache.commons.imaging.formats.jpeg.decoder.JpegInputStream.nextBit() if (b2 =3D=3D (0xff & JpegConstants.DNL_MARKER)) { throw new ImageReadException("DNL not yet supported"); } throw new ImageReadException("Invalid marker found " + "in entropy data"); {noformat} 0xff & 0xffdc =3D 0xdc =3D 220 =3D> if b2 is not 220 then throw an ImageRea= dException! So I modified *org.apache.commons.imaging.formats.jpeg.decoder.JpegInputStr= eam.nextBit()* to print *b2* before the exception is thrown and executed th= e same test for image.jpeg from the issue and _DSC6099.jpg from IMAGING-97: =3D=3D=3D b2 is 208 =3D=3D=3D =3D=3D=3D b2 is 208 =3D=3D=3D Both issues seems to be caused by the same problem: *b2* is 208, not 220 as= expected. Whatever *b2* is - does someone know? > Invalid marker found in entropy data > ------------------------------------ > > Key: IMAGING-134 > URL: https://issues.apache.org/jira/browse/IMAGING-134 > Project: Commons Imaging > Issue Type: Bug > Components: Format: JPEG > Affects Versions: 1.0 > Reporter: John Hewson > Fix For: Patch Needed > > Attachments: image.jpeg > > > I'm getting the following exception when trying to read a JPEG: > Exception in thread "main" org.apache.commons.imaging.ImageReadException:= Invalid marker found in entropy data > =09at org.apache.commons.imaging.formats.jpeg.decoder.JpegInputStream.nex= tBit(JpegInputStream.java:50) > =09at org.apache.commons.imaging.formats.jpeg.decoder.JpegDecoder.decode(= JpegDecoder.java:426) > =09at org.apache.commons.imaging.formats.jpeg.decoder.JpegDecoder.readMCU= (JpegDecoder.java:320) > =09at org.apache.commons.imaging.formats.jpeg.decoder.JpegDecoder.visitSO= S(JpegDecoder.java:124) > =09at org.apache.commons.imaging.formats.jpeg.JpegUtils.traverseJFIF(Jpeg= Utils.java:80) > =09at org.apache.commons.imaging.formats.jpeg.decoder.JpegDecoder.decode(= JpegDecoder.java:436) > =09at org.apache.commons.imaging.formats.jpeg.JpegImageParser.getBuffered= Image(JpegImageParser.java:98) > =09at org.apache.commons.imaging.Imaging.getBufferedImage(Imaging.java:13= 78) > =09at org.apache.commons.imaging.Imaging.getBufferedImage(Imaging.java:13= 41) -- This message was sent by Atlassian JIRA (v6.3.4#6332)