Hi Larry, The example shown below would be what I am looking for but it doesn't work, I found naming the file rgba.exr instead of beauty.exr makes it work.
I appreciate a lot your help, Best, -- Jose Alejandro Enriquez Pipeline TD, PIXOMONDO Skype Name: live:.cid.90318dda1ebc48cf ________________________________ From: Oiio-dev <oiio-dev-boun...@lists.openimageio.org> on behalf of Larry Gritz <l...@larrygritz.com> Sent: Monday, December 13, 2021 1:12 AM To: OpenImageIO dev list <oiio-dev@lists.openimageio.org> Subject: Re: [Oiio-dev] Autocrop when merging images into a multichannel exr [EXTERNAL EMAIL] I'm not sure what you mean by "leaves the RGBA black", but to openexr, channel names can be very important. You can use --chnames to rename the channels of a layer, and --attrib "oiio:subimagename" to name the openexr layer itself. So maybe something like: oiiotool myrgba.exr --chnames R,G,B,A --attrib "oiio:subimagename" "beauty" mydiffuse.exr --chnames diff.R,diff.G,diff.B --attrib "oiio:subimagename" "diffuse" --siappendall -o out.exr On Dec 12, 2021, at 8:57 PM, Jose Alejandro Enriquez <jose.enriq...@pixomondo.com<mailto:jose.enriq...@pixomondo.com>> wrote: Thank you so much, Larry, that is exactly what I needed to know. One more question, if possible, when using --siappendall, is there a way to set the RGBA channels from one of the images?, let's suppose I also have a beauty pass I want to use as RGBA and not like another layer, because using --siappendall leaves the RGBA black. Cheers -- Jose Alejandro Enriquez Pipeline TD, PIXOMONDO Skype Name: live:.cid.90318dda1ebc48cf ________________________________ From: Oiio-dev <oiio-dev-boun...@lists.openimageio.org<mailto:oiio-dev-boun...@lists.openimageio.org>> on behalf of Larry Gritz <l...@larrygritz.com<mailto:l...@larrygritz.com>> Sent: Sunday, December 12, 2021 7:52 PM To: OpenImageIO dev list <oiio-dev@lists.openimageio.org<mailto:oiio-dev@lists.openimageio.org>> Subject: Re: [Oiio-dev] Autocrop when merging images into a multichannel exr [EXTERNAL EMAIL] "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 <jose.enriq...@pixomondo.com<mailto:jose.enriq...@pixomondo.com>> 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 Oiio-dev@lists.openimageio.org<mailto:Oiio-dev@lists.openimageio.org> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org -- Larry Gritz l...@larrygritz.com<mailto:l...@larrygritz.com> _______________________________________________ Oiio-dev mailing list Oiio-dev@lists.openimageio.org<mailto:Oiio-dev@lists.openimageio.org> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org -- Larry Gritz l...@larrygritz.com<mailto:l...@larrygritz.com>
_______________________________________________ Oiio-dev mailing list Oiio-dev@lists.openimageio.org http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org