I was trying to see if I could contribute in a small way to the RT development. Not sure what this will lead to yet
However, I was trying some simple stuff out and wondered what the easiest or most elegant way is to obtain the value of a certain parameter somewhere in the code.
Take for example this snippet from histogrampanel.cc:
for(int i = 0; i < 256; i++) { if(needLuma) { lhisttemp[i] = lhist[i]; }
(…)
the list is built up, but I would like to dump the values somewhere for inspection. How would I go about doing that?
Yes, fprintf is your friend. You can also replace stderr with a previously opened file handle, just don’t forget to close it later in your code. I do this a lot for large captures. Also, Windows isn’t so accommodating to fprintf when running GUI programs from the command line, so writing to the file is the primary alternative.