How can I convert a BufferedImage object to a BMP file?
Created May 4, 2012
Sandip Chitale The BufferedImage allows you to get at the raw data associated with the image using the
BufferedImage bi = //....; int rgb[] = bi.getRGB(int startX, int startY, int w, int h, int[] rgbArray, int offset, int scansize); // The returned int array is in the format - // pixel = rgbArray[offset + (y-startY)*scansize + (x-startX)]; // Now convert this data into the .bmp formatThe information about .bmp file format can be found here -