First of all.. thanks Kostya and Mark for your answers.. They were very helpful... and thanks Yahel for the link. I downloaded Smart Image Resizer and I'm looking at the code to see if will do what I need on the site... My idea right now is to ask users to upload an image with the correct dimensions (height/width ratio) and in the largest size I need or larger. Then scale them automatically, show them to the user, and allow them to upload other images if they don't like the result :).

BUT... my plan is also to name them with memberId_image1.png and memberid_image2.png, and just put the 3 different densities in different folders, but pass the URL with the density needed from my Android app to the website. Of course.. for this to work, I need to know which format the framework has chosen.... I assume this should be easy (famous last words)...

Is there a foolproof way of knowing which density (hdpi, mdpi, or ldpi) the framework is going to use BEFORE the images are downloaded? In my case, the list will already be displaying with a dummy image (something like the way the Market app works.. or the Android Application Manager), so the view will be inflated by the time I start downloading images... Is there a call to ask what density it's running at?




Sincerely,

Brad Gies
-----------------------------------------------------------------------
Bistro Bot - Bistro Blurb
http://bgies.com
http://bistroblurb.com
http://ihottonight.com
http://forcethetruth.com
-----------------------------------------------------------------------

Everything in moderation, including abstinence

Never doubt that a small group of thoughtful, committed people can
change the world. Indeed. It is the only thing that ever has - Margaret Mead


On 30/09/2010 10:02 AM, Kostya Vasilyev wrote:
 Brad,

30.09.2010 20:12, Brad Gies пишет:

Actually, just confirmation that the 24, 32 and 48 are the right sizes for the smaller icons is quite helpful. I can guess at the correct sizes for the larger icons, and then adjust as I test the different AVD's...

The "reference" device densities are: 120 / 160 / 240 for ldpi / mdpi / hdpi respectively.

http://developer.android.com/guide/practices/screens_support.html#range

This means that if you design the artwork you call "larger icons" at a certain size, then the hdpi version should be 6/4 (== 3/2), and ldpi - 3/4 the size of the mdpi version (so hdpi artwork is exactly twice as tall / wide as ldpi).

The mdpi size should preferably be such it can be scaled to 3/2 and 3/4 of the original size without producing fractional pixels.

I am another developer who loathes doing graphics for his programs, and rightly so, since I'm pretty bad at it.

What I found useful is to design my artwork in Photoshop at mdpi (== "normal") density first, trying to use shape objects and to avoid pixel-based tools as much as possible. This is important for next step: scaling the image up in Photoshop to go from mdpi to hdpi, since shapes scale up much better than raster data.

At this point I have with two Photoshop files, one for mdpi and one for hdpi. I then use "File | Save for Web & Devices" to export optimized .PNG images.

The mdpi and hdpi already have the right dimensions for exporting, so no problem there. To create the ldpi version, I export the mdpi file and specify smaller dimensions right in the export parameters window. I found that Photoshop often produces a better quality reduced size image than Android does at runtime, so having pre-built ldpi images is useful. Not all images need this, though: for some, it's ok to just have the mdpi and hdpi versions, and let Android do the scaling down for ldpi.

This workflow could be simplified by working in Photoshop only at hdpi density, and scaling during export for mdpi as well as ldpi. My first Android phone was an HTC Hero (mdpi), so I kind of made mdpi the center of my artwork-related process.

And finally, the link below lists standard icon sizes for various screen densities depending on where and how they are to be used (Launcher, Dialog, List View, etc.)

http://developer.android.com/guide/practices/ui_guidelines/icon_design.html


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to