Java ARGB to JPG
问题 How can I save BufferedImage with TYPE_INT_ARGB to jpg? Program generates me that image: And it's OK, but when I save it in that way: ByteArrayOutputStream byteStream = new ByteArrayOutputStream(); BufferedOutputStream bos = new BufferedOutputStream(byteStream); try { ImageIO.write(buffImg, "jpg", bos); // argb byteStream.flush(); byte[] newImage = byteStream.toByteArray(); OutputStream out = new BufferedOutputStream(new FileOutputStream("D:\\test.jpg")); out.write(newImage); out.close(); }