Hello,
I am new to Java 2D and this list, so excuse me if this question has been
answered, but I could not find an answer in the list archives.
I have an 8-bit (4096x2700) bit map image that is a ray-scaled tiled tif.
Can anyone point me to code samples of how to get the integer pixel value
at a specifc x,y coordinate point of the image ?
-- I read the bit-map-image file using JAIRMI into an applet, but I am not
getting the positive expected integer value:
RemoteRenderedOp rro = remoteBitMapImage.create("fileload",
(new
ParameterBlock()).add(dir+prefixAndSliceNoOfCurrImg+".bmi").add(null).add(Boolea
n.FALSE), null);
// so far this seems to be ok
BufferedImage bufImg = rro.getAsBufferedImage();
int rgb = bufImg.getRGB(x,y); // x,y are valid coordinates
However, "rgb" contains a negative value. Do I have to convert it to something
else ? Is getRGB the correct method to use with a grayscale image ?
Any help is very much appreciated.
Thank you,
Annette
Annette Strupp-Adams
Senior Systems Analyst
[EMAIL PROTECTED]
phone: (301) 435-3150
National Library of Medicine
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".