This content has been marked as final. Show 2 replies
You can use ImageIcon class and pass your byte array to ImageIcon constrcutor. After that the following code will work for you
ImageIcon icon = new ImageIcon(imgByt2); Image image = icon.getImage(); graphics2D.drawImage(image, 0, 0, null);
Just write bytes into output stream as is.