SUMMARY
The “Failed to create image” error message appears in Mari when you have attempted to import an image that is too large. Mari’s current file size limit for the Image Manager is 2GB minus 1 Byte. This article will explain why this is the case, and give instructions on how to reduce the size of your image so that you may import it successfully into Mari.
MORE INFORMATION
Mari’s current file size limit for the Image Manager is 2GB minus 1 Byte. This means that images that are 2GB or larger will not import successfully into the Image Manager, and instead the “Failed to create image” error message will appear.
Image 1: The "Failed to create image" error message.
Most image file types compress images, so it may seem that the image you’re attempting to import is smaller than 2GB when its size is checked in your file explorer. However, Mari extracts all images when importing them, meaning that an image file that appears to be smaller than 2GB may actually be larger after extraction.
The 2GB hard cap is a limitation of Mari’s current version of QT, the application development framework used for Mari. However, from QT 6, there is virtually no limit for the QT container used to package images. As such, once Mari eventually upgrades to QT 6, increasing the Image Manager's file size limit will be taken into consideration.
This enhancement has been previously logged to our internal database, and can be looked for in future release notes by using the following ID:
ID 303634 - Mari should support containers greater than 2^31 bytes
WORKING AROUND THE 2GB LIMITATION
In order to be able to import your image, you will need to reduce its size in an image editing software. There are several ways to do this.
- The first way is to remove the Alpha channel. The Alpha channel stores transparency data, but if your image has no transparency, then the Alpha channel is needlessly present. Removing the Alpha channel should reduce the size of your uncompressed image by ¼.
- If your image has transparency data, and therefore you need to keep your Alpha channel, you can otherwise reduce the size of the uncompressed image by reducing the resolution or bit depth of the image. For example, if your image is 16k, you could change this to 8k in your image editing software. This will reduce the size of your image, and you should now be able to import it successfully into Mari.
- As mentioned before, the current maximum size that your image can be if you want to successfully import it into Mari’s Image Manager is 2GB minus 1 Byte. Many uncompressed images are exactly 2GB in size; an example of this would be a RGBA image that is 16K in resolution and 16-bit in color depth. For these, you can reduce the resolution (height and width) of your image by one pixel, which will reduce the file size of your image just enough that it is accepted by Mari’s Image Manager. You can do this in your image editing software, generally by resizing the image and using pixels as the unit reference.
- Another method is to crop your image into smaller sections. This will be effective for only certain kinds of images; for example, if you want to use a tileable image with a Tiled node, this method is not ideal. However, for instance, if you are trying to import face texture maps for projection, this method can allow you to successfully import the textures while retaining the original quality.
We're sorry to hear that
Please tell us why