File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Android and the fly likes Portrait/Landscape image size Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Portrait/Landscape image size" Watch "Portrait/Landscape image size" New topic
Author

Portrait/Landscape image size

Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585
Hello,

What is the best resolution for portrait and landscape images to be used in my app?

Thanks in advance,


Vassili ...
SCJP 5.0, SCWCD 1.4, SCJA 1.0
Dave MacLean
author
Ranch Hand

Joined: May 10, 2011
Posts: 49

A lot depends on what device (or devices) your app will run on. This is also a big reason why Android comes with the different /res subdirectories, so you could supply different resolution images for different devices that have different screen densities and sizes. This page from the Android Dev Guide does a good job explaining it:

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

So one answer to your question is that portrait and landscape don't really impact image size considerations. It's about size and density. In that page you'll find that Android will attempt to create a decent image if it doesn't have one that fits the device. If you just want one set of images, choose images that look good for the middle size/density (i.e., normal screen size, 160 dpi, icon size of 48x48).

One tool you may be interested in is the Android Asset Studio. While it works best in the Chrome browser, you may get it to work in Firefox. It allows for the easy creation of alternate image sizes. Check it out here:

http://android-ui-utils.googlecode.com/hg/asset-studio/dist/index.html

- dave

Dave MacLean our book (Pro Android 4)
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Portrait/Landscape image size