Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm currently reading some articles about QML, QtQuick and the soon coming Ubuntu SDK and I'm wondering if there are any mechanism that allow a device resolution dependent selection of image resolutions.

For example Android provides a very simple directory structure that differentiate between low resolution devices and high resolution devices, so I just ship different version of the same image with my app and android decides which is the best one for the currently used device.

So the question is how I could support different screen resolutions in applications that use images as backgrounds or button labels?

share|improve this question
up vote 1 down vote accepted

The QML toolkit will down-scale images to meet your resolution-independent size, see the Bitmaps section on

share|improve this answer
So it is a good idea to use "high" resolution images? That's much payload for mobile apps isn't it? And the down-scaling will slow down apps which is very problematic on the entry level Ubuntu smartphones. For example, if the destination size of the bitmap is 10 gu * 10 gu and the developer targets a smart phone with 4 inch HD (720x1,280px) screen (1 gu = 18 px) and a tablet with 10 inch HD screen (1 gu = 10 px) then he/she only needs to create a bitmap of 180 px * 180 px to support both devices. 180x180px is a very large image for a small icon ... :-( – Phidelux Feb 4 '13 at 20:45
If you want an icon that is 10 grid units per side, and a screen with 18 pixels per grid unit, then 180 pixels per side is exactly the size you're after. If it's a small icon, you probably don't want it to be displayed using 10 grid units. – mhall119 Feb 8 '13 at 0:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.