Picture seems to display the Pictures at 1 point = 1 pixel

I display a presized set of images (height = 600 pixels) in a multimedia application created using Xojo.

Earlier today, after changing the dpi from 144 to 72 (it can be far higher on these HiDPI monitors), I was asking myself what will be displayed if I let one file at its native resolution: 144 dpi.r I’ve done that and I saw a gigantic image (~ 1200 pixels high): the image is shown as “display all pixels”.

I changed its resolution.

But the question remains: even OS X Preview have a preference to do that (and I do not talk about the Finder).

Is there’s something that I do not saw to modify Xojo Picture’s actual behaviour ?
(Xojo Picture’s actual behaviour: show all pixels)

I constantly fail to understand why people try to take account of a picture’s DPI when displaying on a screen.

DPI is a print concept. (I expect to be flamed for that, but nonetheless…)

The idea being that if you have a picture which ‘is’ 72 dpi, then a 720 pixel picture should print at EXACTLY 10 inches when printed.
(Assuming the printing follows the dpi)

No such precision is likely on a screen.
Consider: if you have a 11inch Macbook Air, or a 21inch monitor, showing 720 pixels will be a vastly different size: inches has nothing to do with it.
(Yes, you could try to know what screen is being used, and resize to suit, but very few programs do that)

If your picture has 720 pixels and you show them all, it will fit on your screen.
If it has 7200 and you show them all, it won’t.

It doesn’t matter what dpi the picture is suggesting it should be printed at, or whether a dpi setting even exists: a pixel is a pixel.
You can either show them all, or your display routine resizes the picture to fit on screen.

Jeff:
Thank you for taking time to give an answer. You are 100% right.

But, in these times of HiDPI monitor resolution (Retina on Mac), if you do not care, you create 144 dpi (or far more) images (from screen shots or from scans) and at display to monitor time, you do not get the results you expect.

To be more precise, an OS X icon with a 1024 x 1024 (pixels) is now (Mavericks / Yosemite) at 144 dpi. To display it correctly, you have to use that resolution else you will get an image at the double of his size.

[quote=179331:@Jeff Tullin]If your picture has 720 pixels and you show them all, it will fit on your screen.
If it has 7200 and you show them all, it won’t.[/quote]
The real question is here: how do I “print to screen” the image at his own resolution (that is OS X: 72 dpi, Windows: 96 dpi) and ignore any other resolution.

Preview Preferences (OS X):

[quote=179329:@Emile Schwarz]
Is there’s something that I do not saw to modify Xojo Picture’s actual behaviour ?
(Xojo Picture’s actual behaviour: show all pixels)[/quote]
Sure. When you call DrawPicture, make sure you specify Width and Height in points.

Indeed, dot per inch is intrinsically a paper thing.

But on screen, the issue is coming more from the pixel size inconsistency than anything. No doubt a 18"1?2 (47 centimeters) wide 17" screen containing 1920 pixels is not exactly 75 dpi. It is actually 116.36. The same number of pixels on a 15" screen of 14"1/2 width gives 131.95 dpi. And I am not even talking about the iPhone 6 screen :wink:

It is probably difficult enough for the lay man to deal with the basics of 72 pixels per inch, without throwing in all this, though.

Only if the program that does the printing scales the image based on the “dpi”. Otherwise, dots on a page are the same as dots on a screen. At a printer resolution of 600 dots per inch, that 720 pixel image will be just over one inch wide.

Pixels is pixels (or dots or whatever you want to call them). DPI is a recommendation to the printing software. It doesn’t magically change the size or resolution the image prints at.

[quote=179460:@Tim Hare]Only if the program that does the printing scales the image based on the “dpi”. Otherwise, dots on a page are the same as dots on a screen. At a printer resolution of 600 dots per inch, that 720 pixel image will be just over one inch wide.

Pixels is pixels (or dots or whatever you want to call them). DPI is a recommendation to the printing software. It doesn’t magically change the size or resolution the image prints at.[/quote]

Problem is, in the enchanted world of printer drivers there are a lot of things like “fit to page”, scale, and all sorts of wizardry to print pictures. So they seldom print at one pixel = 1 dot.

On the screen, things are fast becoming just as confusing, between scaling and Retina stuff, where sometimes a pixel in the picture is a pixel on screen, and sometimes a point of a different factor. For instance on a Retina screen at 2x and probably on Windows at the Large scale setting, one pixel in the picture is one point itself representing 4 pixels.

Full of joy…

exactly.
So these days it comes down to… here’s 2000 pixels, do what you want with them.
An embedded hint as to dpi is all but meaningless.