For android development can I use JPG image instead of PNG image on image views?

后端 未结 3 2215
情话喂你
情话喂你 2021-02-18 22:53

The main purpose of this question is to know what is the best option to choose between PNG and JPG for android development considering the following scenarios

1) is it a

相关标签:
3条回答
  • 2021-02-18 23:27

    The main difference is image quality. The PNG format uses a lossless compression, while JPEG uses a lossy one optimized for photos. It depends what is shown on the image if JPEG is a valid alternative. In artificially generated images of geometric figures like logos the artifacts coming from JPEG compression can be easily seen.

    0 讨论(0)
  • 2021-02-18 23:42

    It's a question of quality of the images. If you're ok with the loss of quality just use it instead.

    A bitmap file is a .png, .jpg, or .gif file. Android creates a Drawable resource for any of these files when you save them in the res/drawable/ directory.

    0 讨论(0)
  • 2021-02-18 23:48

    It's just a question of quality and details. Just for my opinion, for a big background resolution is better to use a JPG, if you don't need any transparency on the image, with the right compromise between quality and size of file,

    PNG format is a lossless compression file format, which makes it a common choice for use on the Web. PNG is a good choice for storing line drawings, text, and iconic graphics at a small file size.

    JPG format is a lossy compressed file format. This makes it useful for storing photographs at a smaller size than a BMP. JPG is a common choice for use on the Web because it is compressed. For storing line drawings, text, and iconic graphics at a smaller file size, GIF or PNG are better choices because they are lossless.

    From:http://www.labnol.org/software/tutorials/jpeg-vs-png-image-quality-or-bandwidth/5385/

    0 讨论(0)
提交回复
热议问题