pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
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 GMT
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
+     * <a href="https://blog.codinghorror.com/zopfli-optimization-literally-free-bandwidth/">Zopfli
+     * algorithm</a>, 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
+     * <a href="https://blog.codinghorror.com/zopfli-optimization-literally-free-bandwidth/">Zopfli
+     * algorithm</a>, 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
+     * <a href="https://blog.codinghorror.com/zopfli-optimization-literally-free-bandwidth/">Zopfli
+     * algorithm</a>, or use the two-step process mentioned above.
      *
      * @param byteArray bytes from an image file.
      * @param document the document that shall use this PDImageXObject.



Mime
View raw message