File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Portrait/Landscape image size" Watch "Portrait/Landscape image size" New topic

Portrait/Landscape image size

Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585

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
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:

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:

- dave

Dave MacLean our book (Pro Android 4)
I agree. Here's the link:
subject: Portrait/Landscape image size
It's not a secret anymore!