* FYI: RescaleOp fixlet
@ 2006-09-13 15:31 Francis Kung
0 siblings, 0 replies; only message in thread
From: Francis Kung @ 2006-09-13 15:31 UTC (permalink / raw)
To: mauve-patches
[-- Attachment #1: Type: text/plain, Size: 287 bytes --]
Hi,
The attached patch, already committed, updates (and fixes) sample value
generation in the RescaleOp test.
Cheers,
Francis
2006-09-13 Francis Kung <fkung@redhat.com>
* gnu/testlet/java/awt/image/RescaleOp/filterRaster.java
(simpleTests): Remove hard-coded max sample value.
[-- Attachment #2: RescaleOp.diff --]
[-- Type: text/x-patch, Size: 1064 bytes --]
Index: gnu/testlet/java/awt/image/RescaleOp/filterRaster.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/awt/image/RescaleOp/filterRaster.java,v
retrieving revision 1.1
diff -u -r1.1 filterRaster.java
--- gnu/testlet/java/awt/image/RescaleOp/filterRaster.java 6 Sep 2006 16:00:32 -0000 1.1
+++ gnu/testlet/java/awt/image/RescaleOp/filterRaster.java 13 Sep 2006 15:26:49 -0000
@@ -28,7 +28,6 @@
import gnu.testlet.Testlet;
import java.awt.image.BufferedImage;
-import java.awt.image.DataBuffer;
import java.awt.image.RescaleOp;
import java.awt.image.WritableRaster;
@@ -92,7 +91,7 @@
img.getRaster().setSample(1, 1, 0, 1500);
op = new RescaleOp(100, 0, null);
dstRast = op.filter(r, null);
- double maxValue = Math.pow(2, DataBuffer.getDataTypeSize(r.getDataBuffer().getDataType())) - 1;
+ double maxValue = Math.pow(2, r.getSampleModel().getSampleSize(0)) - 1;
harness.check(dstRast.getSample(1, 1, 0), maxValue);
op = new RescaleOp(1, -2000, null);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-09-13 15:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-13 15:31 FYI: RescaleOp fixlet Francis Kung
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).