how to can convert PNG byte data to image javascript code example
Example 1: outputstream to image js example
<img src="data:image/png;base64,[ENCODED STRING GOES HERE]">
Example 2: outputstream to image js example
BufferedImage image = ImageIO.read(new File("helloworld.png"));
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
ImageIO.write(image, "png", outputStream);
String encodedImage = Base64.encode(outputStream.toByteArray());
<img src="data:image/png;base64,[ENCODED STRING GOES HERE]">