Java 2D - Need urgent help ..save BMP image
I have a BMP image .I m extracting itspixels (using PixelGrabber)and formatting those values as per requirements.
Now,I have tocreate an image using this pixels array again.
Image img;
img = createImage(new MemoryImageSource(iw,ih,pixels,0,iw)) ;
This is creating an image "img" of type Image.
Now,I have tosave this image as BMP.
for this I am using
ImageIO.write(img,"BMP",new File("a.bmp"));
The problem is this write method require an image of typeBuffered Image.
I am not able totypecast an object of type Image into BufferedImage.
BufferedImage is subclass of Image class..
I just hope i m making sense..
Please help me..
Is there any other way too to save an BMP image created by createImage()

