[E-devel] 7 ideas to improve the Imlib2 image library
Bep Rinto <[email protected]>
| Newsgroups | gmane.comp.window-managers.enlightenment.devel |
|---|---|
| Message-ID | <CABcrsXUEywMD_ohe3vuxw3A7qoY+obgvP8fQMTEwL+RUjK+_dA@mail.gmail.com> |
I would like to ask attention for the following ideas to improve the awesome Imlib2 software library. Let me first acknowledge that Imlib2 is a great piece of software and I thank all who contributed to it. 1. All installed image loaders are loaded on startup. This takes time and consumes memory unconditionally. What if there are 100 image loaders? 2. One can't limit the possible list of image loaders. Say I want at most support for the TGA image format, but nothing else, then I would like to pass a list of image formats I don't want, or a list of image formats I want at most, but nothing else. 3. There is no way to obtain a list of all the image formats that are supported for the current execution. There is no way to obtain a list of the available image loaders, either. There is no way to query a single image loader for the formats it supports. 4. There is no way to obtain the current version of the loaded library, or to compare it to the version of the header file, which was included at compilation time. I propose to define the version in the header and to add a library call to obtain the library version. 5. When I load an image, then Imlib2 does 4 stat(2) system calls to load a single image. That is clearly wasteful. Just one call could suffice, but perhaps none is needed. If I give you a image file path you can just open/fopen it and start reading. Maybe I already have the file size, or the amount of bytes which Imlib2 is allowed to read from this section of the file. I need to load a large number of small images as fast as possible and want to reduce the number of stat(2) system calls to the minimum. 6. The SVG format has become popular, despite its drawbacks. I assume it would be difficult to write a loader for it, but it would be nice if somehow you could choose to enable support for it, even if partially. 7. If my application comes with its own loaders, then I want to be able to communicate this to Imlib2, but there is no way to set a loader PATH. I assume that my application won't be able to augment the system installed set of loaders. It must remain a part of my application's installed file set. Maybe I have a preferred loader for one image format, which should take precedence over the system set. Thanks for your attention.