Krita saves 8-bit RGBA TGA files in a way that appears to be wrong. GIMP reports this upon an attempt to open such a file: Unhandled sub-format in '/home/alex/Pictures/test.tga' (type = 2, bpp = 32, alpha = 4) (related bug report: https://gitlab.gnome.org/GNOME/gimp/-/issues/9067) From #krita: Lynx3d: "Bits 3-0 - number of attribute bits associated with each pixel. (...) For Targa 32, it should be 8." so it seems wrong indeed that's what krita does: s << quint8(hasAlpha ? 0x24 : 0x20); // top left image (0x20) + 8 bit alpha (0x4):
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1728
Git commit f3e913d6aed527a493ad13855975c5064bdaca87 by Merge Service, on behalf of Freya Lupen. Committed on 01/02/2023 at 20:51. Pushed by merge-service into branch 'master'. Fix writing alpha bits flag in .tga We're writing 8-bit alpha (0x8). Krita assumes this value on reading, but it should still be written correctly, so that other programs can read it. Part-of: <https://invent.kde.org/graphics/krita/-/merge_requests/1728> M +4 -1 plugins/impex/tga/kis_tga_export.cpp https://invent.kde.org/graphics/krita/commit/f3e913d6aed527a493ad13855975c5064bdaca87