Hi.
I wonder if it is possible to first call:
open_file(...)
unpack()
And then to call several times dcraw_process() -after changing pre_mul for example- without calling recycle(), open_file(...) and unpack() again?
Would memcpying imgdata.image after unpack and back do the trick?
Thanks,
Sylvain.
You can call dcraw_process()
You can call dcraw_process() multiple times, no additional data move needed.
-- Alex Tutubalin @LibRaw LLC
I thought that unpack() was
I thought that unpack() was filling imgdata.image with non demosaiced data (only one component per pixel on Bayer layouts), and that dcraw_process() was reading those values and filling the missing components in the same buffer using its demosaicing algorithm...
Is dcraw_process() reading it's non demosaiced data from another buffer than imgdata.image?
unpack() do not fill/allocate
unpack() do not fill/allocate image array
-- Alex Tutubalin @LibRaw LLC
Ok. I was confused with
Ok. I was confused with raw2image().
So after unpack(), an unaltered version of the unpacked data is kept elsewhere than imgdata.image.... Thank you... :)
Well, I've done tests about
Well, I've done tests about this, which didn't work.
Here is my workflow:
open_file
set pre_mul
unpack
dcraw_process(1)
change pre_mul
dcraw process(2)
Change pre_mul gets ignored.
I've tried with adding unpack just before dcraw_process(2), but change pre_mul is still ignored.
That's no big deal for me, I simply recycle() and (re)opent(). I just wanted to keep you posted... ;)
Sylvain.
use imgdata.params.user_mul
use imgdata.params.user_mul if you need to set manual white balance.
-- Alex Tutubalin @LibRaw LLC
Thank you! I had missed that
Thank you! I had missed that one!
Is user_mul being used in unpack() or just in dcraw_process()?
In other terms, do I have to:
change user_mul
unpack()
dcraw_process()
or is it enougth to:
change user_mul
dcraw_process()?
Sylvain.
user_mul is used only in
user_mul is used only in dcraw_process().
For other parameters that may affect unpack() please read API notes: http://www.libraw.org/docs/API-notes-eng.html#imgdata_params
-- Alex Tutubalin @LibRaw LLC
Thanks... That's very nice to
Thanks... That's very nice to have your help... :)