Java BufferedImage from Byte Array fromByteArray(byte[] data)

Here you can find the source of fromByteArray(byte[] data)

Description

from Byte Array

License

Apache License

Declaration

public static BufferedImage fromByteArray(byte[] data) throws IOException 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.awt.image.BufferedImage;

import java.io.ByteArrayInputStream;

import java.io.IOException;
import javax.imageio.ImageIO;

public class Main {
    public static BufferedImage fromByteArray(byte[] data) throws IOException {
        ByteArrayInputStream inputStream = new ByteArrayInputStream(data);
        return ImageIO.read(inputStream);
    }//from w  ww. ja v  a2  s.  c  o  m
}

Related

  1. decodeForRGBBufferedImage(String filePath)
  2. fromByteArray(byte[] byteArray)
  3. fromByteArray(byte[] bytes)
  4. fromByteArray(byte[] imagebytes)
  5. fromByteIntensity(BufferedImage image, byte[] bytes)
  6. fromIntIntensityScaled(int width, int height, int[] data)
  7. fromIntRGB(BufferedImage image, int[] rgb)