Canvas DrawPicture doesn't work with this .png

Please see this sample project:
https://drive.google.com/open?id=1VxbZDHKyM30lRMnWvbbNML8h-gASDq4W

Drag and drop the “doesnt_work.png” into the red rectangle --> it is not displayed.
Drag and drop the “works.png” into the red rectangle --> it is displayed.

What am I missing?

It works for me with both images using Xojo 2018 Release 2.

I also tried it with the latest alpha without success.
Maybe related to my screen configuration (1 x HiDPI and 1 x normal resolution)?

[quote=404464:@Stefan Adelsberger]I also tried it with the latest alpha without success.
Maybe related to my screen configuration (1 x HiDPI and 1 x normal resolution)?[/quote]

This seems to be the issue.
If I turn off “Supports HiDPI” then it works.
Any ideas if this is a bug or am I missing something?

Off the shell Xojo 2015r1 and 2018r2 (El Capitan): I see both dropped image.

If this was running on Windows, aputting this conversation under the Windows channel had to be done. (I do not have a Windows hardware handly).

Nota:
doesnt_work.png is a 72 dpi image (48 pixels x 48 pixels).

Last:
Drop of jpg and tiff files are displayed too.

[quote=404465:@Stefan Adelsberger]This seems to be the issue.
If I turn off “Supports HiDPI” then it works.
Any ideas if this is a bug or am I missing something?[/quote]

No idea?

Picture at 72 dpi instead of 144. Or vice versa.

What OS and version are you trying this on?

I can’t replicate the issue so give this one a try https://www.dropbox.com/s/lvdtbbnpo34v4f7/doesnt_work-test2.png?dl=1

[quote=405050:@JulianS]What OS and version are you trying this on?

I can’t replicate the issue so give this one a try Dropbox - doesnt_work-test2.png - Simplify your life

The one you provided works.
I’m using Windows 10 with Xojo 2018r2 (and r3a24).
So this is regarding to the dpi?
Shouldn’t the picture always be drawn no matter which dpi?

I had the same problem both with .png and with .jpg then I discovered that without the color profile I could not see anything.

[quote=405165:@Stefan Adelsberger]The one you provided works.
I’m using Windows 10 with Xojo 2018r2 (and r3a24).
So this is regarding to the dpi?
Shouldn’t the picture always be drawn no matter which dpi?[/quote]

Some how the PPX and PPY of the image that doesn’t work has been saved as 113 which make the DPI 2.87 where as the working image has PPX and PPY of 2834 which is 72DPI.

If you break the code after reading the image you can see it loads fine as its in the Contents of mIcon, however the mIcon.VerticalResolution and mIcon.HorizontalResolution vars are shown as 3 (rounded up from 2.87).

If you set:

mIcon.VerticalResolution = 72 mIcon.HorizontalResolution = 72

after the Picture.Open it works fine.

The image is there, but its really really big and you are only seeing the top left few pixels of the image. If you set the above two lines to something like 30 you can see it getting bigger, at 6 it will only just be shown, when you get to 3 it “vanishes” as its drawing off the size of the controls.

Setting the PPX and PPY in the image should fix this problem, try a different paint package?