From dev-return-58263-archive-asf-public=cust-asf.ponee.io@pdfbox.apache.org Tue Sep 18 11:03:08 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id F1E9A180672 for ; Tue, 18 Sep 2018 11:03:07 +0200 (CEST) Received: (qmail 3658 invoked by uid 500); 18 Sep 2018 09:03:07 -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 3635 invoked by uid 99); 18 Sep 2018 09:03:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Sep 2018 09:03:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 89771CC7B0 for ; Tue, 18 Sep 2018 09:03:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 76pWUyE1aL5U for ; Tue, 18 Sep 2018 09:03:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 7482E5F501 for ; Tue, 18 Sep 2018 09:03:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C20CEE111B for ; Tue, 18 Sep 2018 09:03:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 79F6C23F99 for ; Tue, 18 Sep 2018 09:03:00 +0000 (UTC) Date: Tue, 18 Sep 2018 09:03:00 +0000 (UTC) From: "Emmeran Seehuber (JIRA)" To: dev@pdfbox.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (PDFBOX-4184) [PATCH]: Support simple lossless compression of 16 bit RGB images 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/PDFBOX-4184?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:all-tabpanel ] Emmeran Seehuber updated PDFBOX-4184: ------------------------------------- Attachment: (was: fix_profile_use2.patch) > [PATCH]: Support simple lossless compression of 16 bit RGB images > ----------------------------------------------------------------- > > Key: PDFBOX-4184 > URL: https://issues.apache.org/jira/browse/PDFBOX-4184 > Project: PDFBox > Issue Type: Improvement > Components: Writing > Affects Versions: 2.0.9 > Reporter: Emmeran Seehuber > Priority: Minor > Fix For: 2.0.12, 3.0.0 PDFBox > > Attachments: 16bit.png, LoadGovdocs.java, fix_profile_use.patch, = images.zip, lossless_predictor_based_imageencoding.patch, lossless_predicto= r_based_imageencoding_v2.patch, lossless_predictor_based_imageencoding_v3.p= atch, lossless_predictor_based_imageencoding_v4.patch, lossless_predictor_b= ased_imageencoding_v5.patch, lossless_predictor_based_imageencoding_v6.patc= h, pdfbox_support_16bit_image_write.patch, png16-arrow-bad-no-smask.pdf, pn= g16-arrow-bad.pdf, png16-arrow-good-no-mask.pdf, png16-arrow-good.pdf, size= _compare.txt > > > The attached patch add support to write 16 bit per component images corre= ctly. I've integrated a test for this here: [https://github.com/rototor/pdf= box-graphics2d/commit/8bf089cb74945bd4f0f15054754f51dd5b361fe9] > It only supports 16-Bit TYPE_CUSTOM with DataType =3D=3D USHORT images - = but this is what you usually get when you read a 16 bit=C2=A0PNG=C2=A0file. > This=C2=A0would also fix [https://github.com/danfickle/openhtmltopdf/issu= es/173]. > The patch is against 2.0.9, but should apply to 3.0.0 too. > There is still some room for improvements when writing lossless images, a= s the images are currently not=C2=A0efficiently encoded. I.e. you could use= PNG encodings to get a better compression. (By adding a COSName.DECODE_PAR= MS with a=C2=A0COSName.PREDICTOR =3D=3D 15 and=C2=A0encoding the images as = PNG). But this is something for a later patch. It would also need another A= PI, as there is a tradeoff speed vs compression ratio.=C2=A0 -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org For additional commands, e-mail: dev-help@pdfbox.apache.org