Android記憶體分析工具MAT:匯出Bitmap,androidmat

來源:互聯網
上載者:User

Android記憶體分析工具MAT:匯出Bitmap,androidmat
 關於MAT的使用,請參見部落格:http://blog.csdn.net/nupt123456789/article/details/42584269
 1.首先開啟MAT的Inspector頁面,在Eclipse中為:Open Window > ShowView > Other.. > Inspector
 2.選中圖片對象android.graphics.Bitmap,在Inspector查看圖片的資訊,如:

 我們需要注意的參數是mHeight和mWidth,即,圖片的高度和寬度
 3.匯出Bitmap的mBuffer資料,儲存為xxxx.data。如:
 
 此時,我們已經擷取到了圖片的資料檔案xxxx.data和圖片的寬高mWidth和mHeight。接下來就是使用工具,將這些資料轉化為圖片即可。
 
 4.下載GIMP軟體,mac上的:http://gimp.lisanet.de/Website/Download.html
 5.運行GIMP,“檔案”->“開啟”,選中之前儲存的xxxx.data檔案,點擊開啟,然後根據mWidth和mHeight修改參數,映像類型選擇“RGB Alpha”
 如果不能正確開啟,調整其他參數。


 -------------------------------------------------------------------
 更多交流,Android開發聯盟QQ群:272209595

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.