rawkit icon indicating copy to clipboard operation
rawkit copied to clipboard

FYI: libraw-cffi

Open Julian opened this issue 4 years ago • 1 comments

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 avatar Jan 02 '20 16:01 Julian

(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).

Julian avatar Jan 02 '20 16:01 Julian