Java Byte Array to BufferedImage byteArrayToBufferedImage(byte[] image)

Here you can find the source of byteArrayToBufferedImage(byte[] image)

Description

byte Array To Buffered Image

License

MIT License

Declaration

public static BufferedImage byteArrayToBufferedImage(byte[] image) throws IOException 

Method Source Code

//package com.java2s;
/**/*  w  w  w .  j  av  a2s .  c  om*/
 * Copyright (c) 2014 Sa?l Pi?a <sauljabin@gmail.com>, Jorge Parra <thejorgemylio@gmail.com>.
 * <p>
 * This file is part of SimulationP3DX.
 * <p>
 * SimulationP3DX is licensed under The MIT License.
 * For full copyright and license information please see the LICENSE file.
 */

import javax.imageio.ImageIO;

import java.awt.image.BufferedImage;
import java.io.*;

public class Main {
    public static BufferedImage byteArrayToBufferedImage(byte[] image) throws IOException {
        InputStream in = new ByteArrayInputStream(image);
        return ImageIO.read(in);
    }
}

Related

  1. byteArrayToBufferedImage(byte[] array)
  2. byteArrayToImage(byte[] imagebytes)
  3. byteArrayToImage(byte[] imageData)
  4. bytesToBufferedImage(final byte[] imageData)
  5. bytesToImage(byte[] buf)