timothybrooks / hdr-plus

HDR+ Implementation
MIT License
594 stars 201 forks source link

Static hdrplus binary by replace dcraw #37

Closed Titaniumtown closed 5 years ago

Titaniumtown commented 5 years ago

Any ideas on how to replace dcraw in order to create a static hdrplus binary?

The dcraw binary location is hard wired into the code, so in order to create a static binary the dependency on dcraw would have to be removed or fully incorporated into the final binary itself.

How would one go about this? If this is achieved we could then have pre-compiled binaries on the release page!

brotherofken commented 5 years ago

Actually it should be possible to remove dcraw now, when libraw was imported for image reading. Isn't it?

Titaniumtown commented 5 years ago

There is something in the HDRPlus.cpp file that referenced camera multipliers that are given though the dcraw binary. And halide_load_raw.h also uses dcraw.

Titaniumtown commented 5 years ago

I am working on a prototype using libraw's "cam_mul[]"

brotherofken commented 5 years ago

Isn't it already done here? https://github.com/timothybrooks/hdr-plus/blob/master/src/InputSource.cpp#L22

Titaniumtown commented 5 years ago

Oh I am sorry I didn't see that part! Never mind then!

Titaniumtown commented 5 years ago

Wait... I found it used in halide_load_raw.h checking if the image can be read.

https://github.com/timothybrooks/hdr-plus/blob/master/src/halide_load_raw.h#L49

Titaniumtown commented 5 years ago

I have a prototype working; so stay tuned!

Titaniumtown commented 5 years ago

Ok I got it to work; I will commit it now!