Java BufferedImage from Byte Array getImage(byte[] bytes)

Here you can find the source of getImage(byte[] bytes)

Description

get Image

License

Open Source License

Declaration

public static BufferedImage getImage(byte[] bytes) 

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 javax.imageio.ImageIO;

public class Main {
    public static BufferedImage getImage(byte[] bytes) {
        try {/*from ww w  . j a va 2  s.com*/
            return ImageIO.read(new ByteArrayInputStream(bytes));
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}

Related

  1. fromByteArray(byte[] imagebytes)
  2. fromByteIntensity(BufferedImage image, byte[] bytes)
  3. fromIntIntensityScaled(int width, int height, int[] data)
  4. fromIntRGB(BufferedImage image, int[] rgb)
  5. getBufferedImage(byte[] imageBytes)
  6. getImage(byte[] imageBytes)
  7. getImage(byte[] imageBytes)