[Radiance-general] dumping xglaresrc result to a file
Ery Djunaedy
ery.mailinglist at gmail.com
Thu May 27 05:25:40 PDT 2010
Thomas,
Thanks for the suggestions.
I am trying to avoid the first option that you suggested below. I get
the impression that it is more difficult. Can you elaborate further?
I tried your suggestion to use xwd. The problem with this route is that
both the ximage (which is called by xglaresrc) and the xwd are
interactive programs. We end up trying to automate something that is
interactive.
The catch is how to select the window to be dumped. The xwd by default
asks the user to click on the window to be dumped. I tried to use the
HDR file name as the window_name and pass it to xwd. Something like:
$ xwd -name sc01jd_view.hdr -out sc01jd_view.xwd
It works but (1) it assumes that no other window is on top of this
window and (2) it captures what is displayed. The first catch means that
we cannot do anything else on the computer while the script is working.
The second catch means that if the xglaresrc picture is bigger than the
monitor (e.g. netbook screen) the picture is actually cut.
For now, I think I can live with that.
Thanks,
Ery
On 05/27/2010 03:06 AM, Thomas Bleicher wrote:
> Ery
>
> How much scripting are you willing to do? If you can relate the output
> of findglare to the graphic representation in xglaresrc ("use the
> source ...") you could reproduce the output with a simple drawing
> library like ImageMagick.
>
> Other than that you could create a shell script that
>
> 1) starts xglraresrc
> 2) waits a few seconds for the highlights to appear
> 3) takes a screenshot of the ximage window with xwd
> 4) kills ximage/xglaresrc
> 5) repeat with next image
>
> Regards,
> Thomas
>
>
> On Wed, May 26, 2010 at 4:58 PM, Ery Djunaedy<ery.mailinglist at gmail.com> wrote:
>
>> Folks,
>> I am writing a script that will take a bunch of HDR files and run the glare
>> analysis.
>> How can I dump the result of xglaresrc to a file (in PNG format, for
>> example)?
>> By default xglaresrc is calling ximage in the background, so I will end up
>> with a lot of windows. What I want is to capture those pop-up windows and
>> dump it to a file.
>> Thanks,
>> Ery
>>
>>
More information about the Radiance-general
mailing list