|
From: Michael B. <mic...@gm...> - 2009-04-15 11:03:55
|
2009/4/15 Jody Garnett <jod...@gm...>: > Have you read the javadocs? > - http://java.sun.com/j2se/1.3/docs/api/java/awt/image/Raster.html#getSample(int, > int, int) > > You need to call the correct getSample method to match the data type > stored in the raster. > But it looks like xx is using a JAI iterator which, I'm fairly sure, allows you to call either getSample (return type is int), getSampleFloat or getSampleDouble regardless of the data type of the image. Back to the question of getting different values from getRGB(x, y) and RectIter.getSample() - I'm afraid it's almost certain that the problem is in your code rather than these methods. When you create an iterator it initially points to the origin (minX, minY) of band 0 in your image. Hope this helps Michael |