"autocrop" forces the data window to conform to the display window by 
discarding data outside the display window and/or padding with black pixels to 
grow the data window to fill the display window. But it only applies to output 
file formats that don't support separate display and data windows (which means 
it has no effect when outputting to .exr). Put another way, "autocrop" really 
means "automatically do --croptofull if the file format doesn't support 
separate display and data windows".

"autotrim" trims away parts of the data window until it gets to the minimal 
rectangle that contains all non-black pixels of the image.

I'm pretty sure it's autotrim you want here.

There is a way to autotrim away the black parts in formats that support it,

    oiiotool --autotrim foo.exr bar.exr --siappendall -o out.exr

or

    oiiotool foo.exr bar.exr --siappendall -o:autotrim=1 out.exr

(In the first, --autotrim makes that the default for all outputs, in the 
second, the modifier to -o makes it autotrim for just that one output in 
particular -- same effect in this example, but remember you can have more than 
one -o in a command.)

As it currently stands, though, the autotrim will trim all "parts" (what OIIO 
calls "subimages") in the output to the union of the region of nonzero pixels 
across all the subimages. Currently, it does not trim each part separately. I 
don't know if that distinction is important to you or not.



> On Dec 10, 2021, at 2:37 PM, Jose Alejandro Enriquez 
> <[email protected]> wrote:
> 
> Hello everyone,
> 
> I was wondering if there is a way to use oiiotool to auto crop images that 
> will be merged using --siappendall. Some layers have less pixel information 
> so, I would like to crop to their size, is this possible?
> 
> I have tried the the -o:autocrop=1 flag before the output without success.
> ​
> Best,
> --
> Jose Alejandro Enriquez
> Pipeline TD, PIXOMONDO
> Skype Name: live:.cid.90318dda1ebc48cf
> _______________________________________________
> Oiio-dev mailing list
> [email protected] <mailto:[email protected]>
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org 
> <http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org>
--
Larry Gritz
[email protected]




_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to