H
homecurr
I use ImageIO to read a 16 bits tiff image. Here is my code:
File file = new File(filename);
BufferedImage image = ImageIO.read(file);
DataBuffer data = image.getData().getDataBuffer();
The type of "data" is unsigned short, but since java does not have
unsigned, it is saved as short in data. I found that the number inside
"data" is not right. It does not match what I read with other tools.
Could anyone help me? Do I need something before read the image?
Thanks,
John crom CA
File file = new File(filename);
BufferedImage image = ImageIO.read(file);
DataBuffer data = image.getData().getDataBuffer();
The type of "data" is unsigned short, but since java does not have
unsigned, it is saved as short in data. I found that the number inside
"data" is not right. It does not match what I read with other tools.
Could anyone help me? Do I need something before read the image?
Thanks,
John crom CA