[Graphics] This is about troubles with image size

You may fall into that trap: you load an image (display an icon/image you dropped in your project) and the display size is not the one you were awaiting. Either too small or too large.

Why ?
The answer is simple: the image dpi is not the one the software (Xojo or the running OS) is awaiting.

Solution ?
Load the image (icon) in your favorite image application (may I suggest well know application(s), not a fancy one ?) and set the dpi size to 72 dpi (or 96 dpi if you prefer), save it, run the software and look how nice it is to have the correctly sized graphic !

Nota: if you have imported the graphic into your project, you may have to re-import it (update it).

From where this kind of error can come ?
From the past, the time where OS native display resolution was 72 dpi (for Macintosh) and 96 dpi (for Windows).

At these times, we had display images and print images (at different dpi).

Now, with HiDPI / Retina / Whatever monitors, you may have many pixels for a dot ON SCREEN (what we already had for Print purposes).

The problem is… we do not knew the images dpi and so, we cannot be aware of the dpi importance. As an example (Macintosh only):

a. Create an image that is 600 x 210 at 144 dpi (for Macintosh),

b. Change the image resolution from 144 dpi to 72 dpi,

c. In the Finder, create a test folder and open it,

d. Move the two images into that folder.

e. In the MenuBar, be sure to have View --> By Icons set,

f. Choose in the View Menu, the “Show View Options” menu Item (something that have that meanings),

A windowid appears that let you read/write some preferences to your window (to all windows too, so be careful).

You will have three RadioButtonsaligned vertically at the bottom of that window. Click in the last one (Probaly called Image). A light Grey round rect appears.

Drop the 72 dpi image file onto that area and enjoy your image as it is displayed in your top/left part of the window. All is OK.

Nota: when the MouseCursor is above the target arean a hite / inside a green circle replace the arrow MouseCursor: you can release the mouse !

Now, drop the 144 dpi image file into the same round rect area and watch the difference:
The iage have to be half of the previous size…

PS: I use Preview for doing these dpi changes…

Is it clear now ?