Return-Path: X-Original-To: apmail-pdfbox-dev-archive@www.apache.org Delivered-To: apmail-pdfbox-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BBF789934 for ; Sun, 11 Mar 2012 14:00:22 +0000 (UTC) Received: (qmail 77024 invoked by uid 500); 11 Mar 2012 14:00:22 -0000 Delivered-To: apmail-pdfbox-dev-archive@pdfbox.apache.org Received: (qmail 76962 invoked by uid 500); 11 Mar 2012 14:00:21 -0000 Mailing-List: contact dev-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pdfbox.apache.org Delivered-To: mailing list dev@pdfbox.apache.org Received: (qmail 76950 invoked by uid 99); 11 Mar 2012 14:00:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Mar 2012 14:00:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Mar 2012 14:00:19 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id BCDAD1928F for ; Sun, 11 Mar 2012 13:59:58 +0000 (UTC) Date: Sun, 11 Mar 2012 13:59:58 +0000 (UTC) From: =?utf-8?Q?Andreas_Lehmk=C3=BChler_=28Resolved=29_=28JIRA=29?= To: dev@pdfbox.apache.org Message-ID: <1905733247.49072.1331474398775.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <889382295.5773.1329831274416.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (PDFBOX-1233) CCITTFaxG31DDecodeInputStream - Extended codes have wrong length MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/PDFBOX-1233?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:all-tabpanel ] Andreas Lehmk=C3=BChler resolved PDFBOX-1233. ---------------------------------------- Resolution: Fixed Fix Version/s: 1.7.0 Assignee: Andreas Lehmk=C3=BChler I was able to double check the patch using a sample pdf Dave sent me in pri= vate as it is confidential. I added the patch in revision 1299358 as proposed. Thanks for the contribution! =20 > CCITTFaxG31DDecodeInputStream - Extended codes have wrong length > ---------------------------------------------------------------- > > Key: PDFBOX-1233 > URL: https://issues.apache.org/jira/browse/PDFBOX-1233 > Project: PDFBox > Issue Type: Bug > Reporter: Dave Smith > Assignee: Andreas Lehmk=C3=BChler > Fix For: 1.7.0 > > > When dealing with large fax images there are Extended Make Up Codes. > They are added to the tree as ... > buildUpMakeUp(LONG_MAKE_UP, WHITE_LOOKUP_TREE_ROOT); > buildUpMakeUp(LONG_MAKE_UP, BLACK_LOOKUP_TREE_ROOT); > Accept, the length is 0 based not starting at 1792. > The quick hack is to create a new method so the length of the node is cor= rect > private static void buildUpMakeUpLong(short[] codes, > NonLeafLookupTreeNode root) > { > for (int len =3D 0, c =3D codes.length; len < c; len++) > { > LookupTreeNode leaf =3D new MakeUpTreeNode((len + 28) * 64); > addLookupTreeNode(codes[len], root, leaf); > } > } > as thus ... > buildUpMakeUpLong(LONG_MAKE_UP, WHITE_LOOKUP_TREE_ROOT); > buildUpMakeUpLong(LONG_MAKE_UP, BLACK_LOOKUP_TREE_ROOT); -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira