dragon66 / java-image-scaling

Automatically exported from code.google.com/p/java-image-scaling
Other
1 stars 1 forks source link

ProgressListener.notifyProgress(float fraction) gets values up to about 191 for fraction, but it should max be 1.0 #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Just implement a ProgressListener and print out the values of fraction

What is the expected output? What do you see instead?
Expected Output: 0.0 to 1.0, I see values up to about 191.

What version of the product are you using? On what operating system?
Version 0.8.1 (jar), resizing Images of about 4000x2500

Please provide any additional information below.
Code:
BufferedImage img = ImageIO.read(file);
ResampleOp resizeOp = new
ResampleOp(DimensionConstrain.createMaxDimension(300, 300, true));
if (pl != null) resizeOp.addProgressListener(pl);
BufferedImage thumb = resizeOp.filter(img, null);

And in the ProgressListener implementation:
public void notifyProgress(float progress) {
      System.out.println("Progress: " + progress);
}

Original issue reported on code.google.com by luzipher...@yahoo.ie on 11 Sep 2009 at 3:25

GoogleCodeExporter commented 9 years ago

Original comment by m%nobel-...@gtempaccount.com on 11 Sep 2009 at 6:14

GoogleCodeExporter commented 9 years ago
Fixed and committed. Fix will be available in 0.8.2

Original comment by m%nobel-...@gtempaccount.com on 12 Sep 2009 at 8:30