harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r986228 - /harmony/enhanced/java/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/jpeg/JPEGImageWriter.java
Date Tue, 17 Aug 2010 07:58:01 GMT
Author: hindessm
Date: Tue Aug 17 07:58:01 2010
New Revision: 986228

URL: http://svn.apache.org/viewvc?rev=986228&view=rev
Log:
Applying patch from "[#HARMONY-6624] Broadcast the progress of image
completion in JPEGImageWriter class".

Modified:
    harmony/enhanced/java/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/jpeg/JPEGImageWriter.java

Modified: harmony/enhanced/java/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/jpeg/JPEGImageWriter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/jpeg/JPEGImageWriter.java?rev=986228&r1=986227&r2=986228&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/jpeg/JPEGImageWriter.java
(original)
+++ harmony/enhanced/java/trunk/classlib/modules/imageio/src/main/java/org/apache/harmony/x/imageio/plugins/jpeg/JPEGImageWriter.java
Tue Aug 17 07:58:01 2010
@@ -111,9 +111,8 @@ public class JPEGImageWriter extends Ima
                         : reg.height;
             }
 
-            //-- TODO uncomment when JPEGImageWriteParam be implemented
             //-- Only default progressive mode yet
-            // progressive = param.getProgressiveMode() ==  ImageWriteParam.MODE_DEFAULT;
+            progressive = param.getProgressiveMode() ==  ImageWriteParam.MODE_DEFAULT;
 
             //-- def is 1
             deltaX = param.getSourceXSubsampling();
@@ -255,11 +254,12 @@ public class JPEGImageWriter extends Ima
      */
     @SuppressWarnings("unused")
     private void getScanLine(int scanline) {
-        //-- TODO: processImageProgress in ImageWriter
         Raster child = sourceRaster.createChild(srcXOff,
                 srcYOff + scanline * deltaY, srcWidth, 1, 0, 0, null);
 
         scanRaster.setRect(child);
+        // broadcast the current percentage of image completion
+        processImageProgress((float) scanline / (float) srcHeight * 100.0f);
     }
 
     /**



Mime
View raw message