Add RLE decode support for TGA image format #73
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Many image editors with exports apply RLE compression for TGA format. I initially could not understand why I had noise instead of images, it turned out that the images were compressed :D. There is slow (but simple) realization of unpacking.
Plus for images with channels less than 3 I added duplication of the channels. This allows forcibly loading them, albeit with costs.
The test program for unpacking works well.
I hope it will be useful
IMPORTANT: If you used, for example, GIMP and created a compressed RLE TGA image in it, and then you unpacked it through the Corange back to the file files will not be the same bit in the bit. This is not an error just at the end there will not be 26 bytes of the image basement. This does not affect anything simply when saving the basement is not added. Therefore, the file size is always equal to 18 bytes header + Size X + Size Y * Number of channels.