Saving bitmap buffer as bitmap image

Eclipse Memory Analyzer doesn’t provide option to view a bitmap buffer directly. Try the following steps that will allow you to save the bitmap buffer as a bitmap image that you can view using any image viewer.

1. Select the bitmap buffer that you would like to Save


2. Save the buffer to your computer

Select the Location in your computer where you would like to save the buffer file. You can give any name and extension

3. Enable inspector view in Eclipse

Once you have saved the bitmap buffer you will have to convert the bitmap buffer to bitmap for which you will need to know height and width of the bitmap.

You can use the inspector window to view the height and width of the bitmap. If inspector window is not available you can enable it using the following option.



4. Find the dimension of the bitmap


5. Convert the bitmap buffer in to bitmap image

Once you have the bitmap buffer, bitmap dimension you can execute the attached java program with the following command line option.

Java <input.bmp> <output.bmp> <bitmap width> <bitmap height>


java MATBitmap debug.bmp converted.bmp 800 800

Bingo! now you can open the converted.bmp in any image editor.


4092 Total Views 4 Views Today