Java BufferedImage from String base64StringToImg(final String base64String)

Here you can find the source of base64StringToImg(final String base64String)

Description

base String To Img

License

Open Source License

Declaration

public static BufferedImage base64StringToImg(final String base64String) 

Method Source Code

//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);
        }
    }
}

Related

  1. base64StringToImage(String imageString)
  2. base64StringToImage(String imageString)
  3. base64ToImage(final String data, final int width, final int height)
  4. base64ToImage(String base64)
  5. base64ToImg(String base64Strings)
  6. decodeImage(String encoded)