Thank you for the response, Larry. What you say makes perfect sense. I'll
forge ahead with my open scriptlet to do this for now. I had some of this
done already, but was hoping there was a shortcut I could take here.

I would obviously be in favour of oiiotool gaining this functionality at
some point - I trust oiiotool would more robustly handle all the flavours
of exr than I would in a simple script.

Thanks again!
Jason

On Wed, Jun 7, 2017 at 10:48 AM, Larry Gritz <[email protected]> wrote:

> You could do the laundering really easily with either C++ or Python, if
> you use the ImageInput API. Once you open the image, you can read the
> scanlines or tiles individually into your buffer with
> ImageInput::read_scanline() and read_tile(). Mind the return value -- in
> C++ it will be `false` for any broken or missing scanlines/tiles, and in
> Python it will return None rather than the array of values for the scanline
> or tile. I think that when you encounter such an error, you can also call
> ImageInput::geterror() and you'll see that the error message probably
> specifically says the message about missing scanline or tile. Rather than
> aborting when you encounter a missing scanline/tile, just set it to black
> in your buffer and try the next scanline or tile. When finished, re-write
> the image, if you want a "complete" version.
>
> The problem is that if you read a whole image at once -- which is what
> ImageBuf does underneath, and therefore how oiiotool operates -- it will
> interpret the failure on any particular tile or scanline as a general
> failure to read the image, and for oiiotool in particular that will
> probably take an early exit.
>
> This does come up from time to time, and is probably worthwhile to have an
> option to allow the read to proceed with whatever parts of the image it
> can, rather than aborting at the first read error. There is some plumbing
> necessary to achieve this. If all you want to do is read what's there and
> keep the rest black, it's fairly straightforward and I think I could do it
> very quickly. But if you need to be able to get a report on exactly which
> scanlines/tiles were or were not available, that's probably much more
> involved, because there's no place we're storing that or passing it around.
>
> -- lg
>
> On Jun 7, 2017, at 10:34 AM, Jason Iversen <[email protected]> wrote:
>
> Hi there,
>
> I'm trying add support for reading partial EXRs to our pipeline - but I'm
> having a devil of a time with it.  RV can read them... sometimes... Nuke,
> not so much. So I'd like to "launder" them through oiiotool.  However it
> appears that oiiotool will also *sometimes* fail with a message:
>
> $ oiiotool /tmp/frame.1090.exr -o /tmp/fix_frame.1090.exr
> oiiotool ERROR: read /tmp/frame.1090.exr : Failed OpenEXR read: Error
> reading pixel data from image file "/tmp/frame.1090.exr". Scan line 713 is
> missing.
>
> I've been scouring the docs for a --force or something like it; does such
> a thing exist?
>
> When rv succeeds in reading a partial image, oiiotool fails on copying it
> forward, and vice-versa. Are there better tools for doing this? Perhaps in
> the OpenEXR repo?
>
> Thanks!
> Jason
>
> --
> Jason Iversen
>   Production Technology Supervisor
>     Digital Domain
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> 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
>
>


-- 
Jason Iversen
  Production Technology Supervisor
    Digital Domain
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to