From commits-return-15908-archive-asf-public=cust-asf.ponee.io@pdfbox.apache.org Sun Oct 13 10:26:08 2019 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 [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id C559818065D for ; Sun, 13 Oct 2019 12:26:07 +0200 (CEST) Received: (qmail 27840 invoked by uid 500); 13 Oct 2019 10:26:07 -0000 Mailing-List: contact commits-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 commits@pdfbox.apache.org Received: (qmail 27830 invoked by uid 99); 13 Oct 2019 10:26:07 -0000 Received: from Unknown (HELO svn01-us-east.apache.org) (13.90.137.153) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Oct 2019 10:26:07 +0000 Received: from svn01-us-east.apache.org (localhost [127.0.0.1]) by svn01-us-east.apache.org (ASF Mail Server at svn01-us-east.apache.org) with ESMTP id 0D59D17BB9F for ; Sun, 13 Oct 2019 10:26:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1868392 - /pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDImageXObject.java Date: Sun, 13 Oct 2019 10:26:07 -0000 To: commits@pdfbox.apache.org From: tilman@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20191013102607.0D59D17BB9F@svn01-us-east.apache.org> Author: tilman Date: Sun Oct 13 10:26:06 2019 New Revision: 1868392 URL: http://svn.apache.org/viewvc?rev=1868392&view=rev Log: PDFBOX-4341: improve javadoc, mention the Zopfli algorithm Modified: pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDImageXObject.java Modified: pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDImageXObject.java URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDImageXObject.java?rev=1868392&r1=1868391&r2=1868392&view=diff ============================================================================== --- pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDImageXObject.java (original) +++ pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDImageXObject.java Sun Oct 13 10:26:06 2019 @@ -187,11 +187,17 @@ public final class PDImageXObject extend /** * Create a PDImageXObject from an image file. The file format is determined by the file name - * suffix. The following suffixes are supported: jpg, jpeg, tif, tiff, gif, bmp and png. This is + * suffix. The following suffixes are supported: JPG, JPEG, TIF, TIFF, GIF, BMP and PNG. This is * a convenience method that calls {@link JPEGFactory#createFromStream}, * {@link CCITTFactory#createFromFile} or {@link ImageIO#read} combined with * {@link LosslessFactory#createFromImage}. (The later can also be used to create a - * PDImageXObject from a BufferedImage). + * PDImageXObject from a BufferedImage). Starting with 2.0.18, this call will create an image + * directly from a PNG file without decoding it (when possible), which is faster. However the + * result size depends on the compression skill of the software that created the PNG file. If + * file size or bandwidth are important to you or to your clients, then create your PNG files + * with a tool that has implemented the + * Zopfli + * algorithm, or use the two-step process mentioned above. * * @param file the image file. * @param doc the document that shall use this PDImageXObject. @@ -230,11 +236,17 @@ public final class PDImageXObject extend /** * Create a PDImageXObject from an image file. The file format is determined by the file - * content. The following file types are supported: jpg, jpeg, tif, tiff, gif, bmp and png. This + * content. The following file types are supported: JPG, JPEG, TIF, TIFF, GIF, BMP and PNG. This * is a convenience method that calls {@link JPEGFactory#createFromStream}, * {@link CCITTFactory#createFromFile} or {@link ImageIO#read} combined with * {@link LosslessFactory#createFromImage}. (The later can also be used to create a - * PDImageXObject from a BufferedImage). + * PDImageXObject from a BufferedImage). Starting with 2.0.18, this call will create an image + * directly from a PNG file without decoding it (when possible), which is faster. However the + * result size depends on the compression skill of the software that created the PNG file. If + * file size or bandwidth are important to you or to your clients, then create your PNG files + * with a tool that has implemented the + * Zopfli + * algorithm, or use the two-step process mentioned above. * * @param file the image file. * @param doc the document that shall use this PDImageXObject. @@ -291,13 +303,17 @@ public final class PDImageXObject extend /** * Create a PDImageXObject from bytes of an image file. The file format is determined by the - * file content. The following file types are supported: jpg, jpeg, tif, tiff, gif, bmp and png. + * file content. The following file types are supported: JPG, JPEG, TIF, TIFF, GIF, BMP and PNG. * This is a convenience method that calls {@link JPEGFactory#createFromByteArray}, * {@link CCITTFactory#createFromFile} or {@link ImageIO#read} combined with * {@link LosslessFactory#createFromImage}. (The later can also be used to create a - * PDImageXObject from a BufferedImage). Since 2.0.18, this call can also create an image - * directly from a PNG file without decoding it, which is faster. However the result size - * depends on the compression skill of the software that created the PNG file. + * PDImageXObject from a BufferedImage). Starting with 2.0.18, this call will create an image + * directly from a PNG file without decoding it (when possible), which is faster. However the + * result size depends on the compression skill of the software that created the PNG file. If + * file size or bandwidth are important to you or to your clients, then create your PNG files + * with a tool that has implemented the + * Zopfli + * algorithm, or use the two-step process mentioned above. * * @param byteArray bytes from an image file. * @param document the document that shall use this PDImageXObject.