commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1535225 - /commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/JpegDecoder.java
Date Thu, 24 Oct 2013 00:22:36 GMT
Author: ggregory
Date: Thu Oct 24 00:22:35 2013
New Revision: 1535225

URL: http://svn.apache.org/r1535225
Log:
The static method createPackedRaster(int, int, int, int[], Point) from the type Raster should
be accessed directly.

Modified:
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/JpegDecoder.java

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/JpegDecoder.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/JpegDecoder.java?rev=1535225&r1=1535224&r2=1535225&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/JpegDecoder.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/JpegDecoder.java
Thu Oct 24 00:22:35 2013
@@ -19,6 +19,7 @@ import java.awt.image.BufferedImage;
 import java.awt.image.ColorModel;
 import java.awt.image.DataBuffer;
 import java.awt.image.DirectColorModel;
+import java.awt.image.Raster;
 import java.awt.image.WritableRaster;
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
@@ -95,13 +96,13 @@ public class JpegDecoder extends BinaryF
             if (sofnSegment.numberOfComponents == 3) {
                 colorModel = new DirectColorModel(24, 0x00ff0000, 0x0000ff00,
                         0x000000ff);
-                raster = WritableRaster.createPackedRaster(DataBuffer.TYPE_INT,
+                raster = Raster.createPackedRaster(DataBuffer.TYPE_INT,
                         sofnSegment.width, sofnSegment.height, new int[] {
                                 0x00ff0000, 0x0000ff00, 0x000000ff }, null);
             } else if (sofnSegment.numberOfComponents == 1) {
                 colorModel = new DirectColorModel(24, 0x00ff0000, 0x0000ff00,
                         0x000000ff);
-                raster = WritableRaster.createPackedRaster(DataBuffer.TYPE_INT,
+                raster = Raster.createPackedRaster(DataBuffer.TYPE_INT,
                         sofnSegment.width, sofnSegment.height, new int[] {
                                 0x00ff0000, 0x0000ff00, 0x000000ff }, null);
                 // FIXME: why do images come out too bright with CS_GRAY?



Mime
View raw message