The image or model can also be given after the construction of the object. In this case, use new-image-gadget and set-image. The gadget will automatically detect if the image changes size or format and reallocate a new texture if needed. This means images can be set even after the gadget has been grafted. Grafted gadgets without an image will display a blank screen.
Notes The image can be set after the gadget has been grafted. However, for an image-gadget, this can be done only once. If your image is changing, you should be using an image-control and a model.
Performance will be greatly reduced if you are using images that have more than 512 pixels on one of their axis.