letmaik / rawpy

📷 RAW image processing for Python, a wrapper for libraw
https://pypi.python.org/pypi/rawpy
MIT License
613 stars 68 forks source link

Add DNG deflate / zlib support #69

Closed letmaik closed 5 years ago

letmaik commented 5 years ago

Branch zlib. Picked up from https://github.com/LibRaw/LibRaw-cmake/pull/6.

letmaik commented 5 years ago

@kmilos Since you mentioned that you'd want this feature for rawpy, which operating system are you on? Currently I don't include any optional features for Windows, but you would get it on macOS/Linux.

kmilos commented 5 years ago

Windows, actually... Is it possible to require JPEG and zlib at wheel build time?

letmaik commented 5 years ago

OK, I see. It's not impossible, just takes a bit more fiddling than on macOS/Linux. I'll see what I can do.

letmaik commented 5 years ago

@kmilos Looks like it's not an issue after all. I'd like you to try it before I do a new release. Which Python version are you using?

kmilos commented 5 years ago

@letmaik Happy to give it a go, thanks. Using Anaconda packaged Python 3.7 built for win-64.

letmaik commented 5 years ago

Download the file at https://ci.appveyor.com/api/buildjobs/eugv54s94k0ake6j/artifacts/dist%2Frawpy-0.14.0-cp37-cp37m-win_amd64.whl to some folder. Then do pip uninstall rawpy and pip install rawpy-0.14.0-cp37-cp37m-win_amd64.whl in the folder where you downloaded it.

kmilos commented 5 years ago

Great, seems to be working, I can now finally read output of https://github.com/jcelaya/hdrmerge

Now I just have to make sure the float to uint16 conversion is happening correctly automagically by LibRaw. I guess having rawpy keep float would be quite intrusive...

letmaik commented 5 years ago

Thanks for testing!

Regarding float, if there is anything from the libraw public API that would allow it, then it's a candidate for inclusion in rawpy.

letmaik commented 5 years ago

This is merged to master now and will be part of the next rawpy release.