Here you can find the source of base64StringToImg(final String base64String)
public static BufferedImage base64StringToImg(final String base64String)
//package com.java2s; //License from project: Open Source License import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.UncheckedIOException; import java.util.Base64; import javax.imageio.ImageIO; public class Main { public static BufferedImage base64StringToImg(final String base64String) { try {/*from ww w . j av a2s. c o m*/ return ImageIO.read(new ByteArrayInputStream(Base64 .getDecoder().decode(base64String))); } catch (final IOException ioe) { throw new UncheckedIOException(ioe); } } }