Skip to content

Commit 159d0c7

Browse files
author
Riyad Kalla
committed
Test for ULTRA_QUALITY.
1 parent 0a73b2b commit 159d0c7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/test/java/org/imgscalr/ScalrResizeTest.java

+14
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package org.imgscalr;
22

3+
import java.awt.image.BufferedImage;
4+
35
import junit.framework.Assert;
46

57
import org.imgscalr.Scalr.Method;
@@ -120,4 +122,16 @@ public void testResizeWHSpeedExactOps() {
120122
Scalr.resize(src, Method.SPEED, Mode.FIT_EXACT, 640, 640,
121123
Scalr.OP_GRAYSCALE));
122124
}
125+
126+
@Test
127+
public void testResizeUltraQuality() {
128+
System.setProperty(Scalr.DEBUG_PROPERTY_NAME, "true");
129+
BufferedImage i = new BufferedImage(32, 32, BufferedImage.TYPE_INT_RGB);
130+
Scalr.resize(i, Method.ULTRA_QUALITY, 1);
131+
132+
// This test is really about having scaling to tiny sizes not looping
133+
// forever because of the fractional step-down calculation bottoming
134+
// out.
135+
Assert.assertTrue(true);
136+
}
123137
}

0 commit comments

Comments
 (0)