天天看點

[ Android Memory] MAT檢視圖檔資源

 ​

以下是測試通過的,至于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 issue ​

​convert​

​ 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
      

繼續閱讀