我在读取使用 ImageMagick 创建的特定 jpeg 图像(CMYK 颜色空间)时遇到问题:
inputStream = new ByteArrayInputStream(bytesImage);
bufferedImage = ImageIO.read(inputStream);
//IIOException : unsupported image type
我尝试使用 JAI 而不是 ImageIO,但它仍然不起作用:
seekableStream = new ByteArraySeekableStream(bytesImage);
bufferedImage = JAI.create("Stream", seekableStream).getAsBufferedImage();
//Unable to render RenderedOp for this operation
有什么办法可以解决我的问题吗?
最佳答案
在 Java 中读取带有 CMYK 颜色的 JPEG 图像相当棘手。但是我已经发布了一个完整的解决方案 here .它还解决了深色变白的问题。
关于java - 图片IO : cannot read image with CMYK color space,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5089324/