Android network download picture is black at the transparent place

Source: Internet
Author: User

PNG can be ported to the network Graphics format, is also a bitmap file storage format for lossless compression. And JPG is our most common image format, images occupy less storage, but also sacrificed the image quality.

The biggest difference between the two is that it is lossy and lossless.

In the case where a transparent PNG image is loaded, the problem is black, typically this:

Server image is a non-destructive image of transparent png, we download to the local time to force it processing in the form of JPG, resulting in image quality damage.

JPG Pictures are not the concept of background transparency.

Network pictures should be saved to the local PNG format and uncompressed

Bitmap.compress (Bitmap.CompressFormat.PNG, MB, OS);

Android network download picture is black at the transparent place

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

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.