1
在將JPEG轉換爲base64方面有很好的資源。如何在不解碼位圖的情況下將JPEG/PNG編碼爲Base64,使用更少的內存
我在這樣做而不解碼到bimap的,避免任何存儲器通貨膨脹特別感興趣。我也明白,任何文件可以通過將其轉換成字節數組首先被編碼成Base64編碼。
因此,如果我們可以直接創建JPEG/PNG文件的字節數組遠遠小於解碼JPEG位圖的字節數組,我們可以將其轉換爲使用較少的內存佔用的base64。
最接近的答案,我所遇到的就是這個https://stackoverflow.com/a/10160856/499752
http://developer.android.com/reference/android/util/Base64OutputStream.html – Selvin 2013-02-12 21:33:29