@@ -0,0 +1,1761 @@
+package com.mortennobel.imagescaling;%0A%0Aimport junit.framework.TestCase;%0A%0Aimport javax.imageio.ImageIO;%0Aimport java.awt.image.BufferedImage;%0Aimport java.io.File;%0A%0A/**%0A * However, when trying the library, I get messages saying that the resize is%0A * still working and that it is over 100%25. This seems a bit odd :-) If I don't%0A * terminate the program myself, it keeps on running. My code is attached.%0A *%0A * I'm using Linux Ubuntu (although this should not matter) and Suns JDK%0A * 1.6.0.16. Version of java-image-scaling is 0.8.1.%0A *%0A * Getting messages like:%0A * Still working - 450,250580 percent%0A * Still working - 450,278381 percent%0A * Still working - 450,306213 percent%0A * Still working - 450,334076 percent%0A * Still working - 450,361908 percent%0A *%0A */%0Apublic class Issue9 extends TestCase %7B%0A%09boolean inProgress;%0A%09public void testForBug()%7B%0A%09%09try %7B%0A%09%09%09inProgress = true;%0A%09%09%09BufferedImage image2D = ImageIO.read(getClass().getResourceAsStream(%22flower.jpg%22));%0A%0A%09%09%09DimensionConstrain dc = DimensionConstrain.createMaxDimensionNoOrientation(1000,1000);%0A%0A%09%09%09ResampleOp  resampleOp = new ResampleOp (dc);%0A%09%09%09resampleOp.setUnsharpenMask(AdvancedResizeOp.UnsharpenMask.Normal);%0A%09%09%09resampleOp.addProgressListener(new ProgressListener() %7B%0A%09%09%09%09public void notifyProgress(float fraction) %7B%0A%09%09%09%09%09assertTrue(inProgress);%0A%09%09%09%09%09System.out.printf(%22Still working - %25f percent %25n%22,fraction*100);%0A%09%09%09%09%7D%0A%09%09%09%7D);%0A%09%09%09BufferedImage rescaledTomato = resampleOp.filter(image2D, null);%0A%09%09%09inProgress = false;%0A%09%09%09System.out.println(%22Done scaling%22);%0A%09%09%09//ImageIO.write(rescaledTomato, %22jpg%22, new File(%22/home/frederik/Afbeeldingen/temp4.JPG%22));%0A%09%09%09try%7B%0A%09%09%09%09System.out.println(%22Waiting%22);%0A%09%09%09%09Thread.sleep(10000);%0A%09%09%09%7D%0A%09%09%09catch (Exception e)%7B%0A%09%09%09%09// e%0A%09%09%09%7D%0A%09%09%7D catch (Exception e) %7B%0A%0A%09%09%7D%0A%0A%09%7D%0A%7D%0A

Add test-case for issue 9