On Jun 19, 2012, at 5:21 PM, Stefan Stavrev wrote:
> Not sure what to do with the caller for over, "action_over" in oiiotool.cpp:
>
> http://pastebin.com/kZ54PP0q
>
> Only lines 11 and 12 need to be changed, that is, we need to set resolution,
> number of channels and alpha channel, before calling ImageBufAlgo::over.
>
> I could set the resolution to be the union of the two input images.
Yeah, I think you want something like:
ImageSpec Rspec = Aspec; // that transfers all the usual metadata
set_roi (Rspec, union(roi(Aspec), roi(Bspec)));
Rspec.nchannels = std::max (Apsec.nchannels, Bspec.nchannels);
if (Rspec.alpha_channel < 0 // remember, this came from A.spec above
&& R.nchannels == 4)
Rspec.alpha_channel = 3; // assume unlabeled 4 channel image is
RGBA
>
> But to set number of channels and alpha channel I will need to do some checks
> on the input images and this "light" wrapper, won't be so light after that.
> Really, I have no idea what to do with this, someone has ideas?
>
> Also I realized how limited the usage of over will be by using the command
> line. You can't specify region of interest, you can't specify offsets, etc.
> What arguments can the user give to over on command line?
At the moment, ROI should be set to the full union (i.e. R's ROI) on the
initial call to over(), and then it is used internally to parallelize over
threads.
In the future, we may wish to add some kind of ROI command line argument to
oiiotool, but it's not necessary at the moment.
--
Larry Gritz
[email protected]
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org