Question about HIDPI

First Question/Statement

I understand Xojo now natively supports HIDPI for Mac and Windows. Years ago, I did this custom solution to have a “retina” graphics on my Mac builds by having regular resolution images and 2X resolution images that are scaled down. It worked on the Mac by determining the scale factor using this library declare I found.

With the new Xojo, I selected the HDPI setting to see what would happen and got this error message:

“The Transparent property cannot be used with Pictures with alpha channels”

…and an error on a seemingly unrelated piece of code. If I had two images, I could figure this out, but I have perhaps hundreds of images in my app. How do I got about finding which graphic among my hundreds is the culprit?

Second Question:

I assume with a windows machine with a normal resolution the scaled images will look OK, but on a windows machine with a higher resolution, the scaled images will look much better.I guess I am asking whether even with the HDPI setting off that the scaled images on a higher resolution screen will look better? I hope I am making sense here.

Thank you for your input

For the best experience you’ll want to convert your pictures to images anyway, so you’ll come across it at some point.

Hmm. Are you saying that I have ancient PICT files when you say convert? I am pretty sure all of my graphics are PNGs. Otherwise I am not sure what you mean and what I need to do.

No, I’m saying that there are two ways to store a picture in Xojo. A Picture which represents a single file, and an Image which is one to three files. If you want to take advantage of the automatic resolution conversion in Xojo’s Retina framework, you’ll need to combine your matching low Rez and high res Pictures into Images.

Thank you. I understand now. With my hundreds of pictures, this is a long task.

For my other question, will scaling larger pictures down into smaller canvases produce a HIDPI affect on Windows?

You should be able to right click on a picture and select Convert to Image.

Technically yes. With HiDPI on that’s what the framework does for you. Just add the 1,2 and 3x versions and the framework will choose the correct one at runtime.