Am Dienstag, 14. August 2018, 11:33:28 CEST schrieb Jochen Keil: > Hi, Hi.
> to add even more confusion, I learned about the `gui_post_expose()` > module api method / callback. I guess that's what the comment is gui_post_expose() is used to draw stuff ontop of the image. It's for example used by crop&rotate, gnd and vignetting. I don't think that you need that. > talking about. However, it seems not to be implemented for the > temperature module..? It's only implemented in very few modules and totally optional. > Can someone shed some light on this please? > > Thanks, > > Jochen > > On Sun, Aug 12, 2018 at 10:35 PM Jochen Keil <jochen.k...@gmail.com> wrote: > > Hi, > > > > I'm interested in writing an automatic white balance module or preset > > for darktable, similar to rawtherapee's AWB mode. Briefly spoken, it > > allows one to set a bias value for warmer / cooler tones and > > calculates the color temperature using all pixels in the image (like > > using the spot preset with a 100% area for the color picker). > > > > So far I kind of understand darktable's module interface, but I don't > > understand how the color picker works. Since you are using the whole image anyway there is no need for using the color picker. Just iterate over the image. > > To my understanding, the color > > picker can only function when in GUI mode? Yes. It's a way for the user to interact with dt. > > I.e. it needs mouse focus, > > calling the color picker module in the background will crash > > darktable. Yes. > > Another thing I couldn't figure out was how the spot preset works > > exactly. A comment says, that the coefficients are filled in the > > "expose" callback, which, I guess, refers the X11 Expose event, but I > > can't find the callback in the source code... It's the draw() callback in temperature.c. In GTK2 it was called expose(). > > So, for a working module or preset I need some information: > > > > 1) How can I get all the necessary information / color values from the > > picture (color picker?)? Just look at the image. If you need the data from the full image you have to use the preview pipe and sync the data to the other pipe. Some of the color transfer iops should already do something like that. > > 2) How does the algorithm for calculating the white balance using a > > bias look like? Maybe look at how RT is doing it. > > Thank you very much, > > > > Jochen Tobias
signature.asc
Description: This is a digitally signed message part.