JPEG image with wrong colors
I found a solution now, that works, at least if my resulting image is also a JPEG: First I read the image (from byte array imageData), and most important, I also read the metadata. InputStream is = new BufferedInputStream(new ByteArrayInputStream(imageData)); Image src = null; Iterator<ImageReader> it = ImageIO.getImageReadersByMIMEType(“image/jpeg”); ImageReader reader = it.next(); ImageInputStream iis = … Read more