Chasm-Reverse icon indicating copy to clipboard operation
Chasm-Reverse copied to clipboard

Feature Request: Full TGA file spec format support

Open jopadan opened this issue 2 years ago • 4 comments

Proposal

  • add full TGA 2 specification support with adding xTGA as a submodule
Library TGA 2 support
xTGA by @xNWP full
aseprite by @aseprite incomplete
sail by @HappySeaFox incomplete
libimago by @jtsiomb incomplete
Boost.GIL by @boostorg incomplete

jopadan avatar Jun 04 '23 16:06 jopadan

It is a good idea to integrate some lightweight image library to save screenshots. But i am afraid, that both your suggestions are not so good - they have too few stars. Try to find more popular library.

Also, it is possible to use not TGA, but PNG for screenshots. In such case it is even possible to build with system LibPNG. But such dependency should be optional, in order to build the project on Windows without libPNG installed.

Panzerschrek avatar Jun 06 '23 10:06 Panzerschrek

In my opinion it is better to stay with TGA for screenshots which supports the desired palette and flip, because the main image format the game uses is TGA. The only existing library supporting full TGA 2 format is xTGA. Adding it as a submodule doesn't introduce any unnecessary dependencies.

jopadan avatar Jun 15 '23 00:06 jopadan

It is a good idea to integrate some lightweight image library to save screenshots. But i am afraid, that both your suggestions are not so good - they have too few stars. Try to find more popular library.

That's the funniest criterion for choosing a library I've heard :) Btw the link to libimago above is mangled, here's a the correct link: https://github.com/jtsiomb/libimago

Having said that, you don't need a library to write a TGA image, it's dead simple, especially if you don't use RLE.

Edit: oh and I just noticed, my library doesn't save TGA files (EDIT2: now it does), I apparently never bothered to implement that, only reads them, so it doesn't do what you need I'm afraid... well I guess it's time I added the missing write routine, why not. Thanks for the reminder!

jtsiomb avatar Jun 15 '23 04:06 jtsiomb

@jtsiomb thanks for reporting the typo. I changed the above link

jopadan avatar Jun 15 '23 20:06 jopadan