kinow commented on a change in pull request #106:
URL: https://github.com/apache/commons-imaging/pull/106#discussion_r523804095



##########
File path: 
src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffImageWriterBase.java
##########
@@ -330,9 +330,19 @@ public void writeImage(final BufferedImage src, final 
OutputStream os, Map<Strin
         final int width = src.getWidth();
         final int height = src.getHeight();
 
+        // If the source image has a color model that supports alpha,
+        // this module performs a call to checkForActualAlpha() to see whether
+        // the image that was supplied to the API actually contains
+        // non-opaque data in its alpha channel. It is common for applications
+        // to create a BufferedImage using TYPE_INT_ARGB, and fill the entire
+        // image with opaque pixels. In such a case, the file size of the 
output
+        // can be reduced by 25 percent by storing the image in an 3-byte RGB
+        // format. This approach will also make a small reduction in the 
runtime
+        // to read the resulting file when it is accessed by an application.

Review comment:
        🎉




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to