Image Set Editor

../../_images/image_set_editor_image_set_editor.png

The Image Set Editor lets you manage pictures and images dragged into your iOS projects and your desktop and web projects when the Supports HiDPI setting in Shared Build Settings is set to ON (this is the default on MacOS and Windows). The Image Set Editor displays three sizes for the image. When you drag an image into your project it is automatically assigned to the 1x size. This size is used for standard (non-HiDPI) screen resolutions. You can add additional 2x and 3x resolutions for use by HiDPI screens.

All images must have the same aspect ratio. For example if your 1x image is 64x64 @ 72DPI, then the 2x image must be the same ratio (1:1) and would typically be 128x128 @ 72DPI or 64x64 @ 144DPI. Make sure that that the tool you use to create or edit your images properly sets the image DPI (dots per inch). Some tools (such as Photoshop) do not properly set the DPI which can cause Xojo to interpret the image as the wrong size.

These images are not copied to your project, but are referenced as external items. This means if you move the external files or copy the project, the images may not be found. It is often convenient to create a ProjectImages folder next to your project where you place your images files and then drag them from there.

You can click on any image in the Image Set Editor to select it. Press the Delete key to delete the image. You can use the contextual menu to open the image in the system default image editor or to show the location of the image on the drive.

In your source code you refer to the image by its name as shown in the Navigator. If there are multiple sizes, your app will automatically choose the most appropriate size to display at runtime based on the type of screen being used. If there is only a single size image then it will be scaled as appropriate for the screen resolution.

ImageView1.Image = MyImage

You can rename an image in your project (this does not affect the name of the images on the drive) by change the Name property in the Inspector.