Summary:
implemented 8 bit color mapped images with 24/32bpp palette.
This is coming from an issue on [[ https://github.com/derf/feh/issues/491 | feh ]] to support indexed TGA images. Written by [[ https://github.com/rofl0r | rofl0r ]], I'm forwarding it because I already have the tools for submission set up.
N.b. I'm not terribly familiar with the particular code style, if there's anything to format differently I'm happy to update.
Test Plan:
- Compared [[ https://0x0.st/zgB4.tga | example file ]] with known good in GIMP, looks okay.
- Tested that said example file doesn't load without this patch (in feh, which uses Imlib2).
Reviewers: kwo
Differential Revision: https://phab.enlightenment.org/D10618
Summary:
Decompressing should be the last step, otherwise files that can't even be loaded will take unnecessarily long only to be discarded immediately.
This is in reference to [this issue for feh](https://github.com/derf/feh/issues/477) complaining about long load times in case of accidentally trying to open a big .tar.bz2 archive.
Test Plan: Ran on sample from aforementioned ticket, observed immediate response and no further ill effects.
Reviewers: kwo
Differential Revision: https://phab.enlightenment.org/D10398
The test images at https://entropymine.com/jason/bmpsuite were most
helpful.
Several features have NOT been implemented, including
- Non-square resolution
- "Bottom up" format
- PNG compression
- JPEG compression
- Huffman 1D (OS/2) compression
- 2 bpp (OS/2)
- BA file type (bitmap array - OS/2)
Summary:
... and add imlib_create_image_using_data_and_memory_function().
For example, it allows to load an image in one process and then
pass it through shared memory to another process without extra
memory copy.
Reviewers: kwo
Differential Revision: https://phab.enlightenment.org/D10222
If there are not enough pixels in the image data just fill in the first
color.
This way we will proceed without uninitialized pixel data avoiding
valgrind complaints.
Pixels with color "none" were composed using uninitialised GB values.
Although the pixels were "correct", as RGB are don't-care when A is 0,
let's not put random data in images and avoid valgrind complaints.
Thanks to Sebastien Ballet for test case.
Instead of assigning it (in different ways) in each loader, do it
centrally in __imlib_LoadImageWrapper().
And a couple of cleanups in code related to im->format.