Thank you very much, this looks great! I'll see about getting it downloaded and compiled here.
Jake On Sun, Jul 12, 2020 at 10:43 PM Larry Gritz <l...@larrygritz.com> wrote: > Sorry for the delay, but I finally have a patch that adds the ability to > write a multi-subimage file from Python using ImageBuf: > https://github.com/OpenImageIO/oiio/pull/2640 > <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_OpenImageIO_oiio_pull_2640&d=DwMFAg&c=JcFUeuDFY0-fLlVcnMFzOs2NCorWw4WCPRKumlhOKYU&r=WIyedYAZ5n5U0HzMwQHzuk5IwuQ4_tqF6fyyfFN5Xjs&m=4H-XsnlWQ-otylbBf9NwEtwZAZ1nOdCwp-jyV0rZZ9c&s=hAiSJoWKDOFL1Qn1bZhGs2Eg5TpJIWumgHoYhqCxslg&e=> > > Also, somewhat recently, a feature was added to master that makes oiiotool > much more flexible with applying comments to only particular subimages or > sets of subimages in a multi-subimage file: > https://github.com/OpenImageIO/oiio/pull/2582 > <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_OpenImageIO_oiio_pull_2582&d=DwMFAg&c=JcFUeuDFY0-fLlVcnMFzOs2NCorWw4WCPRKumlhOKYU&r=WIyedYAZ5n5U0HzMwQHzuk5IwuQ4_tqF6fyyfFN5Xjs&m=4H-XsnlWQ-otylbBf9NwEtwZAZ1nOdCwp-jyV0rZZ9c&s=9Fv7DFZzGLoDYGzmBbZZ6jJxEJ8uEkqApbhRkPUK00U&e=> > > > > On Apr 25, 2020, at 9:25 PM, Jake Richards <tru...@blueskystudios.com> > wrote: > > Thank you for the prompt reply! This doesn't have to be done in python > but it was a convenient place to do it (I'm burning in some metadata to the > frames) I did try the command line version of oiiotool but unfortunately > our older version didn't seem to have the -a flag. I have a ticket for us > to get the most recent version compiled but 1.8.7 had been working for us, > so maybe this will up the priority on that ticket. I'd still like to see > if I can accomplish this in python too as a learning experience. Could I > use the ImageBuf for subimage 0 and then copy subimages 1-15 to a new > ImageOutput? Thank you again! > > Jake > > > On Sat, Apr 25, 2020 at 4:12 PM <oiio-dev-requ...@lists.openimageio.org> > wrote: > >> Send Oiio-dev mailing list submissions to >> oiio-dev@lists.openimageio.org >> >> To subscribe or unsubscribe via the World Wide Web, visit >> >> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.openimageio.org_listinfo.cgi_oiio-2Ddev-2Dopenimageio.org&d=DwICAg&c=JcFUeuDFY0-fLlVcnMFzOs2NCorWw4WCPRKumlhOKYU&r=WIyedYAZ5n5U0HzMwQHzuk5IwuQ4_tqF6fyyfFN5Xjs&m=x3L68TVxs8mao9Tj9D4w1yrQW7ccXtycvVn7ZDHBNQU&s=RcaFwXwER3cCfDeUYn4U16VDmwGOM9OAvy_MUIrRljs&e= >> or, via email, send a message with subject or body 'help' to >> oiio-dev-requ...@lists.openimageio.org >> >> You can reach the person managing the list at >> oiio-dev-ow...@lists.openimageio.org >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of Oiio-dev digest..." >> >> >> Today's Topics: >> >> 1. render_text on subImage (Jake Richards) >> 2. Re: render_text on subImage (Larry Gritz) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Fri, 24 Apr 2020 23:34:55 -0400 >> From: Jake Richards <tru...@blueskystudios.com> >> To: oiio-dev@lists.openimageio.org >> Subject: [Oiio-dev] render_text on subImage >> Message-ID: >> <CANmduAGrXx+vToXBFKufmGzk+VNU9O2vosaVH2SdyZXbdOz= >> z...@mail.gmail.com> >> Content-Type: text/plain; charset="utf-8" >> >> Hello: >> I apologize if this isn't the forum for asking a question like this, but >> I was attempting to render some text into the first sub image of an exr >> but >> it appears the ImageBuf will only write out the current sub image. My >> simple code is: >> >> import OpenImageIO as oiio >> ib=oiio.ImageBuf("L.0101.exr") >> oiio.ImageBufAlgo.render_text(ib,100,100,"HELLO",60,"Arial >> Bold",(1,1,1,1)) >> ib.write("hello.exr") >> >> The original exr has 16 sub images but hello.exr has only the 1. What >> would be the best way to get all sub images written out with rendered >> text? Would I have to iterate all the sub images copying their >> spec/pixels? We are using an older version of oiio, 1.8.7 but I might be >> able to convince them to upgrade if this is easier in the master release. >> Thank you! >> >> Jake >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: < >> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.openimageio.org_pipermail_oiio-2Ddev-2Dopenimageio.org_attachments_20200424_6ef36177_attachment-2D0001.html&d=DwICAg&c=JcFUeuDFY0-fLlVcnMFzOs2NCorWw4WCPRKumlhOKYU&r=WIyedYAZ5n5U0HzMwQHzuk5IwuQ4_tqF6fyyfFN5Xjs&m=x3L68TVxs8mao9Tj9D4w1yrQW7ccXtycvVn7ZDHBNQU&s=3fzzPkqZy5wN7czFIVTAioAQkHjHR5p7w9imo2HMv8s&e= >> > >> >> ------------------------------ >> >> Message: 2 >> Date: Fri, 24 Apr 2020 21:43:29 -0700 >> From: Larry Gritz <l...@larrygritz.com> >> To: OpenImageIO developers <oiio-dev@lists.openimageio.org> >> Subject: Re: [Oiio-dev] render_text on subImage >> Message-ID: <2f21c247-89c5-4f96-b9b0-ca1cbb6a3...@larrygritz.com> >> Content-Type: text/plain; charset="us-ascii" >> >> Ick. The problem is that ImageBuf only holds one subimage at a time. And, >> er, it's a little tricky to write a multi-subimage file with IB's from >> Python. That... needs fixing, it's a bit embarrassing that I don't have a >> simple answer. I guess it's rare enough that nobody has complained, so I >> didn't quite realize how tricky this particular task would be. >> >> MUST this be Python, or can you use oiiotool for this task? (It's got the >> multi-subimage workflow down.) >> >> To test this, I tried: >> >> # Make 5 images >> oiiotool --frames 1-5 --pattern "checker:color2={FRAME_NUMBER/8}" >> 1024x1024 3 -d half -o "{FRAME_NUMBER}.exr" >> # Staple them together as subimages >> oiiotool [1-5].exr --siappendall -o all.exr >> # Add text, the -a is crucial to preserve and operate on all subimages >> oiiotool -a all.exr --text:x=100:y=100 HELLO -o text.exr >> >> and the resulting text.exr does seem to have the text in all subimages. >> >> Now, I did this with master, and also verified with the current supported >> release, 2.1. >> >> Maybe it will work with older, too, but I haven't checked. Release 1.8 is >> very old, I wouldn't want to try to figure out what was wrong if it didn't >> work the first time. So many things have been fixed and improved since then. >> >> >> >> > On Apr 24, 2020, at 8:34 PM, Jake Richards <tru...@blueskystudios.com> >> wrote: >> > >> > Hello: >> > I apologize if this isn't the forum for asking a question like this, >> but I was attempting to render some text into the first sub image of an exr >> but it appears the ImageBuf will only write out the current sub image. My >> simple code is: >> > >> > import OpenImageIO as oiio >> > ib=oiio.ImageBuf("L.0101.exr") >> > oiio.ImageBufAlgo.render_text(ib,100,100,"HELLO",60,"Arial >> Bold",(1,1,1,1)) >> > ib.write("hello.exr") >> > >> > The original exr has 16 sub images but hello.exr has only the 1. What >> would be the best way to get all sub images written out with rendered >> text? Would I have to iterate all the sub images copying their >> spec/pixels? We are using an older version of oiio, 1.8.7 but I might be >> able to convince them to upgrade if this is easier in the master release. >> Thank you! >> > >> > Jake >> > >> > _______________________________________________ >> > Oiio-dev mailing list >> > Oiio-dev@lists.openimageio.org >> > >> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.openimageio.org_listinfo.cgi_oiio-2Ddev-2Dopenimageio.org&d=DwICAg&c=JcFUeuDFY0-fLlVcnMFzOs2NCorWw4WCPRKumlhOKYU&r=WIyedYAZ5n5U0HzMwQHzuk5IwuQ4_tqF6fyyfFN5Xjs&m=x3L68TVxs8mao9Tj9D4w1yrQW7ccXtycvVn7ZDHBNQU&s=RcaFwXwER3cCfDeUYn4U16VDmwGOM9OAvy_MUIrRljs&e= >> >> -- >> Larry Gritz >> l...@larrygritz.com >> >> >> >> >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: < >> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.openimageio.org_pipermail_oiio-2Ddev-2Dopenimageio.org_attachments_20200424_400e012f_attachment-2D0001.html&d=DwICAg&c=JcFUeuDFY0-fLlVcnMFzOs2NCorWw4WCPRKumlhOKYU&r=WIyedYAZ5n5U0HzMwQHzuk5IwuQ4_tqF6fyyfFN5Xjs&m=x3L68TVxs8mao9Tj9D4w1yrQW7ccXtycvVn7ZDHBNQU&s=FIQSqN9ePreLc28LeDaLwA76vt2njxsosDe_f-3-78k&e= >> > >> >> ------------------------------ >> >> Subject: Digest Footer >> >> _______________________________________________ >> Oiio-dev mailing list >> Oiio-dev@lists.openimageio.org >> >> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.openimageio.org_listinfo.cgi_oiio-2Ddev-2Dopenimageio.org&d=DwICAg&c=JcFUeuDFY0-fLlVcnMFzOs2NCorWw4WCPRKumlhOKYU&r=WIyedYAZ5n5U0HzMwQHzuk5IwuQ4_tqF6fyyfFN5Xjs&m=x3L68TVxs8mao9Tj9D4w1yrQW7ccXtycvVn7ZDHBNQU&s=RcaFwXwER3cCfDeUYn4U16VDmwGOM9OAvy_MUIrRljs&e= >> >> >> ------------------------------ >> >> End of Oiio-dev Digest, Vol 139, Issue 21 >> ***************************************** >> > _______________________________________________ > Oiio-dev mailing list > Oiio-dev@lists.openimageio.org > http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org > > > -- > Larry Gritz > l...@larrygritz.com > > > > >
_______________________________________________ Oiio-dev mailing list Oiio-dev@lists.openimageio.org http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org