Here you can find the source of decodeImage(String imageString)
public static BufferedImage decodeImage(String imageString)
//package com.java2s; //License from project: Open Source License import java.io.*; import java.awt.image.*; import javax.imageio.*; import javax.xml.bind.*; public class Main { public static BufferedImage decodeImage(String imageString) { BufferedImage image = null; byte[] imageBytes; imageBytes = DatatypeConverter.parseBase64Binary(imageString); ByteArrayInputStream bis = new ByteArrayInputStream(imageBytes); try {/*from ww w . java 2 s . com*/ image = ImageIO.read(bis); bis.close(); } catch (IOException e) { e.printStackTrace(); } return image; } }