How does Android get thumbnails of pictures or videos

Get thumbnails according to the specified image path and size. This method has two advantages:

1. Using a small memory space, the bitmap obtained for the first time is actually null, just to read the width and height. The bitmap read for the second time is the image compressed according to the proportion, and the bitmap read for the third time is the desired thumbnail.

2. The thumbnail does not stretch the original image. A new tool thumbnailutils in version 2.2 is used here. The image generated by this tool will not be stretched.

The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>