Q100707:解决将图像导入图像管理器时出现的“创建图像失败”错误

概括

当您尝试导入过大的图像时Mari Mari中会出现“创建图像失败”的错误信息。Mari 当前图像管理器的文件大小限制为 2GB 减 1 字节。本文将解释原因,并提供减小图像大小的说明,以便您能够成功将其导入Mari

更多信息

Mari的图像管理器当前文件大小限制为 2GB 减 1 字节。这意味着 2GB 或更大的图像将无法成功导入图像管理器,并会显示“创建图像失败”的错误信息。


图 1:“创建图像失败”错误消息。

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.

这项改进已记录在我们的内部数据库中,您可以使用以下 ID 在未来的版本说明中查找:

ID 303634 - Mari应该支持大于 2^31 字节的容器

绕过2GB限制的方法

为了能够导入图片,您需要先使用图像编辑软件缩小图片尺寸。有几种方法可以做到这一点。

  • 第一种方法是移除 Alpha 通道。Alpha 通道存储透明度数据,但如果图像本身没有透明度,那么 Alpha 通道就显得多余了。移除 Alpha 通道应该可以将未压缩图像的大小减少四分之一。

  • 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.

  • 另一种方法是将图像裁剪成更小的部分。这种方法仅对某些类型的图像有效;例如,如果您想使用 Tiled 节点处理可平铺图像,则此方法并不理想。但是,例如,如果您尝试导入用于投影的人脸纹理贴图,则此方法可以让您成功导入纹理,同时保持原始质量。

    我们很遗憾听到

    请告诉我们