Adding an Image

I’ve been studying the DragPicture example that include an image of a StudeBaker, but I cannot create the same.

Each time I drag an image in to my project it creates an image with 1x, 2x and 3x images. I just want a plain image to use as a logo within the form window. Even if I drag the StudeBaker image back in to the example project from the example folder it creates an image again with 1x,2x and 3x options. How do I stop this happening.

Thanks

try to drag your image by pressing command-alt (on a mac don’t know for windows ctrl-win ?)
it should generate one single element.

Great that works, but cannot find reference to that import method anywhere. Is it a documented feature.

don’t know, I found it by accident !
also if you drag a .png it is dropped in one single element, and if you press cmd-alt it is a group of 3 elements
if you drag a .jpg it is dropped in 3 elements, and in one element if you press cmd-alt.
I’m not seeking too much in the documentation, but I never read this anywhere.

@Nick Franklin The images with three versions are called Image Sets. The different versions are automatically selected at different display resolutions (eg. HiDPI.)

If your image set only contains one image don’t fight it, just go ahead and use the image. If you run multi-resolution later on then it’ll be easy to updates the images.then

@Jean-Yves Pochez
What you suggested worked fine on Catalina, but back in my office on Mojave, CMD-Alt, minimises Xojo so I cannot drag images in to it. Dragging a PNG still creates Image Sets

What you see is a feature and not a bug. If you don’t want the HiDPI images then you have to set HiDPI to off.

@Beatrix Willius Where do I set HiDPI to off.

@Beatrix Willius OK, found it many thanks.