Java Byte Array to BufferedImage byteToBufferedImage(byte[] buff)

Here you can find the source of byteToBufferedImage(byte[] buff)

Description

byte To Buffered Image

License

Open Source License

Declaration

public static BufferedImage byteToBufferedImage(byte[] buff) throws IOException 

Method Source Code

//package com.java2s;
/* autonoesis -- Automatic Movie Processor
 * Copyright (C) 2008 Shuichi Kurabayashi <Shuichi.Kurabayashi@acm.org>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.//from  w  w  w .  ja  v a 2s  .c  om
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

import java.awt.image.BufferedImage;

import java.io.ByteArrayInputStream;

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

public class Main {
    public static BufferedImage byteToBufferedImage(byte[] buff) throws IOException {
        return ImageIO.read(new ByteArrayInputStream(buff));
    }
}

Related

  1. byteArrayToImage(byte[] imageData)
  2. bytesToBufferedImage(final byte[] imageData)
  3. bytesToImage(byte[] buf)
  4. bytesToImage(byte[] imageData)
  5. bytesToImage(byte[] imageData)
  6. byteToBufferedImage(byte[] imgBytes)