Cannot load big size of TGA in Tiled 0.17.1



Tiled 0.17.1 cannot load 2048x2048 TGA to Tileset


(Thorbjørn Lindeijer) #2

32-bit or 64-bit version and which operating system?

And could earlier version of Tiled load such a large TGA file?



I used windows 10 pro 64 bit. I can load small size 256x256x32 TGA, but cannot load 2048x2048x32 TGA. (Failed to load tileset image)

I can view / use 2048x2048x32 TGA with other applications.

I used Tiled 0.16.2 before…

Thanks a lot.

(Thorbjørn Lindeijer) #4

Alright, I’ve looked shortly into your issue.

It’s strange that you indicate that you used Tiled 0.16.2 before, because I can’t load any TGA image with that version. That is because the Qt TGA image plugin wasn’t shipped with the Windows installer until Tiled 0.17.1.

With Tiled 0.17.1, I can open TGA images, even if they are 2048x2048. However, loading TGA images that use RLE compression is not working. If your 2048x2048 file is not at least 12 MB, then it is probably using RLE compression. Could that be the difference between your small and large TGA image?

I think it’s a strange omission if Qt really doesn’t support RLE compression for TGA, though.



I used PNG format before Tiled 0.17.1, It so great!
I attach two TGA for your reference. One file ‘XnConvert_cannot_use.tga’ is not work that it process with XnConvert before, another file is work.

Thanks a lot ! (867 Bytes)

(Thorbjørn Lindeijer) #6

So, I can confirm that the XnConvert_cannot_use.tga file does not appear to be using RLE compression yet it still doesn’t work in Tiled. And actually, when looking at the type of file the output looks strange:

[bjorn@thor tmp]$ file *.tga
photoshop_version_can_use.tga:            Targa image data - RGBA 128 x 128 x 32 - 8-bit alpha
XnConvert_cannot_use.tga:                 Targa image data - RGB 128 x 128 x 32

The above indicates that the file would be in “RGB” format yet it uses 32-bits per pixel. That is strange, and actually when opening the file in GIMP it opens with an alpha layer.

I think you need to convince XnConvert to set the type to “RGBA”. Or maybe use something else. When I use ImageMagick’s convert tool on the file, its type gets corrected to “RGBA”:

[bjorn@thor tmp]$ convert XnConvert_cannot_use.tga XnConvert_cannot_use_convert.tga
[bjorn@thor tmp]$ file XnConvert_cannot_use_convert.tga
XnConvert_cannot_use_convert.tga:         Targa image data - RGBA 128 x 128 x 32 - 8-bit alpha

However, for some reason even this file won’t load in Tiled… on the Qt bug tracker I could only find this bug, which is not related to any specific missing features in the tga plugin.