tags:

views:

57

answers:

1

How do i create new bmp image in java from int array that contains pixels (from getPixel() of pixelGrabber class) ?

Thanks

A: 

Make a BufferedImage and call setPixel.

BufferedImage: http://download.oracle.com/javase/1.4.2/docs/api/java/awt/image/BufferedImage.html

If you want BMP file then you can use ImageIO.write(bufferedImage,"BMP", new File("mybmp.bmp"));

I would give you the link to ImageIO class but Stack Overflow is preventing me from spamming.

MrAnonymous