photoshell / rawkit

ctypes based libraw bindings
https://rawkit.readthedocs.io/
MIT License
68 stars 21 forks source link

FYI: libraw-cffi #156

Open Julian opened 4 years ago

Julian commented 4 years ago

Hi! Props, rawkit seems nice.

This isn't really a bug (so apologies for putting it on your issue tracker), but I had a need for CFFI based bindings for libraw, so I put together libraw-cffi.

If you haven't used/seen CFFI before, it's really miles easier/less effort to use than ctypes (see e.g. how libraw-cffi basically just copy pastes libraw/libraw.h and then dynamically binds all the struct-using functions).

I haven't fully tried it, but I suspect that if you'd like to, rawkit's libraw could be replaced by it (and likely be faster/easier to maintain for both CPython and PyPy).

Here's e.g. a port of the save_jpeg_to_pil example from rawkit.

Wanted to post this to get your thoughts, so if nothing else you were aware :)

And thanks again for making rawkit!

Julian commented 4 years ago

(Oh and sorry -- at the minute it's a bit apples to oranges considering libraw-cffi doesn't support anything but libraw 0.19, but it should be fairly easy to backport).