Closed eXeC64 closed 5 years ago
Hi,
I started studying libnsgif
and imv's backend structure.
Is there some doc on imv's backend structure (
EDIT: found the doc.imv_backend
, imv_source
, ...)?
I haven't documented it, but the gist is that a backend is a wrapper for a specific library or implementation that, if able, creates a "source" for a given path or blob of data.
A source is an object that represents an open handle on an image. It emits bitmaps on demand, abstracting away all implementation details of a given backend.
If you have better name ideas or tweaks you want to make I'm open minded. The names were a result of me not being able to think of something better that didn't conflict with names I'd already used.
I'm not familiar with imv
's code or with libraries like freeimage
. I was trying to understand how to write a backend without having to read an other backend (and having to read freeimage
doc).
The comments from backend.h
and source.h
are enough (at least for now, I may have some more digging to do ^^).
It could be nice to have a quick description (outside of the comments) of how imv_source
et imv_backend
work and how they are used. It would make it easier for someone not familiar with imv
to create a new backend.
Implemented by a6deca0. Closing.
http://www.netsurf-browser.org/projects/libnsgif/
It's licensed under MIT, making it a nice permissive alternative to FreeImage.