xmlgraphics-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerem...@apache.org
Subject svn commit: r884009 - /xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/ImageEncodingHelper.java
Date Wed, 25 Nov 2009 09:09:01 GMT
Author: jeremias
Date: Wed Nov 25 09:08:28 2009
New Revision: 884009

URL: http://svn.apache.org/viewvc?rev=884009&view=rev
Log:
Partially reverted my revision 829059. Some code made it into the commit that wasn't supposed
to. This resulted in slightly larger output files because for images with a palette the RGB
fallback was activated.

Modified:
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/ImageEncodingHelper.java

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/ImageEncodingHelper.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/ImageEncodingHelper.java?rev=884009&r1=884008&r2=884009&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/ImageEncodingHelper.java
(original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/ImageEncodingHelper.java
Wed Nov 25 09:08:28 2009
@@ -22,11 +22,9 @@
 import java.awt.color.ColorSpace;
 import java.awt.image.ColorModel;
 import java.awt.image.ComponentColorModel;
-import java.awt.image.ComponentSampleModel;
 import java.awt.image.DataBuffer;
 import java.awt.image.DataBufferByte;
 import java.awt.image.IndexColorModel;
-import java.awt.image.MultiPixelPackedSampleModel;
 import java.awt.image.PixelInterleavedSampleModel;
 import java.awt.image.Raster;
 import java.awt.image.RenderedImage;
@@ -273,19 +271,6 @@
                 }
             } else if (cm instanceof IndexColorModel) {
                 if (cm.getTransferType() == DataBuffer.TYPE_BYTE) {
-                    Raster raster = image.getTile(0, 0);
-                    SampleModel sm = raster.getSampleModel();
-                    if (sm.getNumBands() > 1) {
-                        return;
-                    }
-                    if (sm instanceof ComponentSampleModel) {
-                        ComponentSampleModel csm = (ComponentSampleModel)sm;
-                        if (csm.getPixelStride() < csm.getSampleSize(0)) {
-                            return;
-                        }
-                    } else if (!(sm instanceof MultiPixelPackedSampleModel)) {
-                        return;
-                    }
                     this.firstTileDump = true;
                     this.encodedColorModel = cm;
                 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org


Mime
View raw message