/**
* Write a compressed version of the bitmap to the specified outputstream.
* If this returns true, the bitmap can be reconstructed by passing a
* corresponding inputstream to BitmapFactory.decodeStream(). Note: not
* all Formats support all bitmap configs directly, so it is possible that
* the returned bitmap from BitmapFactory could be in a different bitdepth,
* and/or may have lost per-pixel alpha (e.g. JPEG only supports opaque
* pixels).
*
* @param format The format of the compressed image
* @param quality Hint to the compressor, 0-100. 0 meaning compress for
* small size, 100 meaning compress for max quality. Some
* formats, like PNG which is lossless, will ignore the
* quality setting
* @param stream The outputstream to write the compressed data.
* @return true if successfully compressed to the specifi
bitmap 压缩 compress
最新推荐文章于 2024-03-01 14:58:07 发布
这篇博客主要讨论了Bitmap在Android中的压缩问题。通过示例展示,当使用特定参数压缩时,Bitmap的实际压缩效果并不明显,数据主要被写入到bout中。内容涉及到Android图像处理和内存优化的相关知识。
摘要由CSDN通过智能技术生成