对于Android开发,我可以在图像视图上使用JPG图像而不是PNG图像吗? [英] For android development can I use JPG image instead of PNG image on image views?

查看:118
本文介绍了对于Android开发,我可以在图像视图上使用JPG图像而不是PNG图像吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题的主要目的是考虑以下情况,以了解在Android开发中选择PNG和JPG的最佳选择是什么

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)使用jpg图像作为背景是一个好选择吗? 2)与.png相比,.jpg图像的加载时间会更长吗? 3)与.png相比,.jpg是否需要更多时间进行渲染/加载?

1) is it a good option to use jpg image as background? 2) Will .jpg image take more time to load compared to .png? 3) Will .jpg take more time for rendering/loading compare to .png?

当我们使用png图像时,我发现图像尺寸存在很大差异.

I have seen big difference in image size when we are using png images.

我的.png图像大小之一为 4.1 MBs ,而具有.jpg图像格式的同一图像的大小减小为 2.9MBs

One of my .png image size is 4.1 MBs and that same image with .jpg image format the size is reduced to 2.9MBs

特别需要专家的建议.

信息:减小应用大小.我仍然通过使用压缩png

Info: To reduce app size. i am still compressing images by using compress png and compress jpeg

图像大小差异巨大. IE.压缩后为4.1 MB png-> 2.9 MB jpg减少为 654.6 KB ..

Image size difference is huge. ie. 4.1 MBs png -> 2.9 MBs jpg after compressing it reduced to 654.6 KBs..

要将图片设置为 BACKGROUND ,我没有发现任何问题...

To set image as BACKGROUND i didn't found any issue...

推荐答案

这只是质量和细节问题. 依我之见,如果您不需要图像的任何透明度,并且文件质量和大小之间有适当的折衷,那么使用大的JPG分辨率更好地使用JPG

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格式是一种无损压缩文件格式,使其成为在Web上使用的常见选择. PNG是以较小的文件大小存储线条图,文本和图标图形的理想选择.

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格式是一种有损的压缩文件格式.这对于以小于BMP的尺寸存储照片很有用. JPG是压缩的,因此是在Web上使用的常见选择.对于以较小的文件大小存储线条图,文本和图标图形,GIF或PNG是更好的选择,因为它们无损.

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.

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

这篇关于对于Android开发,我可以在图像视图上使用JPG图像而不是PNG图像吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆