[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: [Community Suggestion] Defining a Common Image Buffer Userdata
- From: Joseph Wallace <tangent128@...>
- Date: Sat, 10 Oct 2015 21:27:24 -0400
The Lua ecosystem is currently rather weak in providing image support.
Every library I'm aware of that has use for images (Lua-SDL2, Löve,
G4L, Magick) implements its own image decoders, which produce an image
type unique to that library.
These libraries sometimes have provisions for exporting an image blob to
a string or lightuserdata, but often they can't reimport, and it's
hardly a common interface.
Have a discussion to define a common struct layout and well-known
userdata metatable name for image rasters, to allow modules to
interoperate more easily.
Eventually then publish a reference header file that can be incorporated
I'm working on an example I can post later, if anybody's interested.
How to balance between usefulness and complexity, especially in regard
to things like stride and pixel formats?
How to keep memory safety, given this will almost certainly feature a
Is it worth the work? How many projects need patches before anybody
actually sees benefit from this?
~ Joseph Wallace
 Löve is more a custom interpreter than a library, but close enough
to be relevant.