im->w and im->h must always be set before __imlib_AllocateData() is
called due to non-immediate loading (__imlib_AllocateData() only
comes in play when the pixel data must be loaded).
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