且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

[ Android Memory] MAT查看图片资源

更新时间:2022-02-17 22:33:09

参考: http://***.com/questions/12709603/mat-eclipse-memory-analyzer-how-to-view-bitmaps-from-memory-dump/12709604#12709604

以下是测试通过的,至于GIMP方式,我没有实验成功。

1: 打开mat的inspector视图,比较重要的是mBuffer,  mWidth, mHeight

[ Android Memory] MAT查看图片资源

2:  

In MAT for related Bitmap object right click mBuffer field and select "Copy" -> "Save Value To File", name the file with an .rgba extension.

You need to note bitmap width and height from mWidth and mHeight fields, which you can see in Bitmap object.

Having ImageMagick command line tools installed (for Ubuntu apt-get install imagemagick), you issueconvert command with the following parameters.

convert -size 'width'x'height' -depth 8 filename.rgba filename.png

For example

 convert -size 680x1209 -depth 8 phone_decor.rgba phone_decor.png

 

分类: Android Memory
本文转自demoblog博客园博客,原文链接http://www.cnblogs.com/0616--ataozhijia/p/4013035.html如需转载请自行联系原作者

demoblog