我发现在使用Java读取图像(JPEG)时,许多像素的RGB值与photoshop中的不同,JIMI得到的RGB值也与ImageIO不同,我怎样才能得到RGB值。与java中的photoshop相同?谢谢!
这就是我通过以下方式阅读图像的方式:
1.ImageIO
BufferedImage test = ImageIO.read(file);
2.Jimi
JimiReader createJimiReader = Jimi.createJimiReader(new FileInputStream(filename));
JimiRasterImage rasterImage = createJimiReader.getRasterImage();
3.JAI
FileSeekableStream st = new FileSeekableStream(filename);
BufferedImage asBufferedImage = JAI.create("stream", st).getAsBufferedImage();