Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it easier to supply one high resolution drawable PNG asset and let Android scale this down?

I'm looking to create a background image for a viewgroup in an Android app, and I'm not sure what is best to do with the asset.

Is it easier (read:looks better on most phones) to simply supply the asset as 900x570 or there abouts and let Android scale it up and down automatically, or scale it myself in Photoshop and provide these images in the 3 drawable-ldpi, drawable-mdpi, and drawable-hdpi folders?

The space saving will be so small: around 10-20k, it makes more sense to me to simply let Android scale the images itself.

The targeted API will be 2.0 upwards, and tablets aren't being supported to begin with.

like image 495
Chris S Avatar asked Nov 01 '11 19:11

Chris S


2 Answers

It is clearly easier from the developer standpoint to let Android scale the images for you, but it does not look better on most phones. Photoshop has better scaling algorithms than Android does in my experience.

like image 78
kabuko Avatar answered Oct 12 '22 22:10

kabuko


if you only specify one copy images in any of drawable, drawable-ldpi, drawable-mdpi, and drawable-hdpi, android will by default scale it for you

however it is a good practice put different size images for performance reasons

like image 43
Optimus Avatar answered Oct 12 '22 22:10

Optimus