Skip to content

Commit

Permalink
Test for ULTRA_QUALITY.
Browse files Browse the repository at this point in the history
  • Loading branch information
Riyad Kalla committed Dec 6, 2011
1 parent 0a73b2b commit 159d0c7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/test/java/org/imgscalr/ScalrResizeTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.imgscalr;

import java.awt.image.BufferedImage;

import junit.framework.Assert;

import org.imgscalr.Scalr.Method;
Expand Down Expand Up @@ -120,4 +122,16 @@ public void testResizeWHSpeedExactOps() {
Scalr.resize(src, Method.SPEED, Mode.FIT_EXACT, 640, 640,
Scalr.OP_GRAYSCALE));
}

@Test
public void testResizeUltraQuality() {
System.setProperty(Scalr.DEBUG_PROPERTY_NAME, "true");
BufferedImage i = new BufferedImage(32, 32, BufferedImage.TYPE_INT_RGB);
Scalr.resize(i, Method.ULTRA_QUALITY, 1);

// This test is really about having scaling to tiny sizes not looping
// forever because of the fractional step-down calculation bottoming
// out.
Assert.assertTrue(true);
}
}

0 comments on commit 159d0c7

Please sign in to comment.