Ugh, no, I replied to the wrong email. Just ignore what I said.
> On Jun 24, 2016, at 10:43 PM, Larry Gritz <[email protected]> wrote: > > For those following along at home, Michel and I have been discussing this > off-list, and thanks to his investigation, it turns out that the real issue > is explained and fixed with this patch: > > https://github.com/OpenImageIO/oiio/pull/1441 > > > >> On Jun 23, 2016, at 1:36 AM, Michel Lerenard <[email protected]> wrote: >> >> Hi, >> >> A while ago, I had an issue with single channel tiff files ( crash in alpha >> premult ), which I fixed by setting >> "oiio:UnassociatedAlpha" = 1 in the spec config. >> >> Weird thing is, I kept getting crashes with another file that declares >> multiple channels, in the same premult function. >> In my code, I read channel by channel, so I have multiple calls to >> TIFFInput::read_scanline, with chbegin = chend each time. >> >> After a bit of debug, I found that the first time I call the function, the >> m_convert_alpha boolean is correctly set to false. However, in the second >> call, it get erased in ImageInput::read_scanlines and is set to true. >> >> The issue comes from the way the read_native_scanline function is coded: if >> we request a scanline that we have already read, we close the file and >> reopened it using this calls: >> if (! close () || >> ! open (m_filename, dummyspec) || >> ! seek_subimage (old_subimage, old_miplevel, dummyspec)) { >> return false; // Somehow, the re-open failed >> } >> >> >> So obviously, the current config paremeters are lost. Isn't it possible >> rewind instead of reopening the file ? >> >> >> Second question: can the premult work when reading channel per channel ? >> Naively I'd say that it can't: we may not have the data in memory. >> >> Michel >> > > -- > Larry Gritz > [email protected] > > -- Larry Gritz [email protected] _______________________________________________ Oiio-dev mailing list [email protected] http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
