Read byte array into buffered image WITHOUT ImageIO
问题 I have a code that turns a byte array into BufferedImage using ImageIO. public void readImage(byte[] imageBytes) { ByteArrayInputStream inputStream = new ByteArrayInputStream(imageBytes); BufferedImage bufferedImage = null; try { bufferedImage = ImageIO.read(inputStream); } catch (Exception e) { e.printStackTrace(); } // do something with bufferedImage } But I found that for certain jpeg images, it throws a CMMException, every time. Here's the stack trace: java.awt.color.CMMException: Cannot