Question on dragging images to project

Silly question, but I am curious first of the why and second for which is preferred

When I drag images into a Xojo project, some of them are inserted with just the image as is, and others are inserted as a 1x, 2x, and 3x. See images below. I’ve never add an image to the forum but attempted below. :slight_smile:

Is drag and drop the way to go to insert your images? Which is preferred? Single image or 1, 2, 3x? In my ones that are 1x, 2x, 3x, I have not been adding any of the 2x or 3x. Wasn’t sure how to accomplish this.

I occasionally run into users getting NilObjectExceptions and am grasping at straws. It donned on me today that maybe it’s the images that are missing the 2x and 3x. In which case I should add these too or just somehow add so they’re just the one image and not the 1, 2, 3x. Do you think this could be a potential issue for my few troublesome users?

You do not explain from where those image (the one they have 3 inside a single file) comes from.

BTW: I already saw, far before HiDPI or Retina, a single image who holds more than one image. On MacOS, you can have far more than 3 images (identical) in one file.

BTW: are-you sure about what you wrote: 2x, 3x ? The ones I already saw have identical images and I mean same size.

Hi Emile. In the example above, all of the PANEL_ images came from the same folder, which is on the same computer as the Xojo project. They were all selected (at once) and dragged over to the project (altogether). In that example, all made the single image (top image) and only the PANEL_Chat made the bottom image with the “Any 1x, 2x, and 3x” on the right pane of the main window

I guess my question is do I need to add images to the Any 2x and Any 3x slots in the bottom image in any pics that have an image set like this. Could this have anything to do with the occasional NilObjectException some users face since there are empty (nil) 2x and 3x images in some of my image folders? Or is this not worth the effort and just leave as is with some single images and some image sets?

Ryan, I can’t see the images, I think you used dropbox but not using the share option.

I always get the 1x, 2x and 3x on the right when I drag images or select new image from the Insert icon.

I don’t know why you are getting different results.

Are you using mac, windows or linux? What OS version? What Xojo version?

Ah ha so that’s why you cannot see my images. I need a tutorial on how to use the forum when posting an image :). Yes, these were from dropbox

I’ll try just with the URLs

Here’s the look for the majority of images I drag into Xojo. Again, I have these in a folder on my computer (Windows). I select all the files I want to import to Xojo and drag them into the project. In this example, all of the ones I dragged over made the single image

And the other image (PANEL_Chat) came up as an image set

Can you view these images?

Yes, I can view the images. You just have to change the URL final part ?dl=0 to ?raw=1 to make it work (well, you need to put the url between [img] [/img]

First image:

Second image:

That helps! always wondered how you guys did that. Thank you for posting these.

So thoughts?? Is it mandatory to fill in the 2x and 3x? Could this be my NilObject issue some users have?

The Image Set Editor (1x, 2x, 3x) is used when you add images to a project with Supports HiDPI enabled.$image-set-editor

You do not need to fill in all sizes, but if you don’t images might be a little fuzzier on some displays due to scaling.

Ok thanks Paul. So this wouldn’t be the NilObject culprit? Drat. Ok, back to the drawing board

Ok, I understand that if HiDPI is enabled and I drag an image, then I get the Image Set Editor.
If I set HiDPI to OFF then I will only get a single image.

But how is possible if I drag multiple images I get some as Image Set Editor and not others?

I just did a test adding images to a project, setting HiDPI on and off and I can have some representation as single image and others as image set, but I can’t drag several at the same time with the same setting and get some for one type and some for the other.

I do not know. I have not seen this behavior. A Feedback case with the steps and sample images might be helpful.

Paul, I have not seen that either, I was just referring to this: