Can you clarify a bit about exactly what's going on?
So, in your app, for the bottom or right tiles, does your app prepare a buffer
that's the size of a regular tile and only fill part of it in? Or does your
app size its buffer big enough only for the valid pixels in that bucket?
Which of {exr,tiff} appears to be working correctly? And what happens for the
one that's broken?
The intended behavior is that the app can either pass in a full bucket or a
"sized" bucket, as long as it gets the strides correct (but using Autostride
will cause it to assume it's a "full" bucket). In theory, the plugin will only
copy the valid pixels out of the app's buffer. Also in theory, the plugin is
responsible for copying your pixels into a temp buffer, if necessary, in order
to match the expectations of the underlying image format library. I'd need to
look at the docs for those libraries to refresh my memory about exactly what
the expect in these two cases.
On Oct 11, 2013, at 12:36 PM, Lerenard Michel wrote:
> Ok, one detail in your post rings a bell. I'm actually calling write_tile
> without any stride parameter, thinking my previous calls to copy_image would
> have written data correctly in the buffer.
> I'll check if setting the stride manually solves my issue.
>
> I'm still confused by the fact that the two plugins does not have the same
> behavior.
>
>
> 2013/10/11 Larry Gritz <[email protected]>
> Which one seems to be working properly and which is broken?
>
> Is there a specific resolution that can reproduce the problem?
>
> From the *app's* point of view, it shouldn't matter. The app is calling
> write_tile with strides, which can let it easily specify whether it's a
> buffer the full size of an ordinary tile, or if the buffer is truly the size
> of a partial tile.
>
> The plugin is then responsible for rearranging the data, if necessary, before
> passing on to the underlying format-writing library (libtiff or libIlmImf).
> It's entirely possible that one of these is not doing that properly, though
> it would be slightly surprising to me because I don't recall having any
> errors reported related to this, and we use both file types.
>
> -- lg
>
>
> On Oct 11, 2013, at 8:38 AM, Michel Lerenard wrote:
>
> > Hi,
> >
> > i've stumbled across a serious issue while saving images. I'm using the
> > write_tile function to write data in the image, and the function does not
> > have the same behavior in Tiff and EXR plugins when writing the bottom and
> > left border tiles, whose height and width can be truncated to respect the
> > image size.
> >
> > The tiff plugin requires a buffer which covers a complete tile (ie
> > spec.tilewidth*spec.tileheight*spec.channels) => non contiguous data on
> > partially used border tiles.
> > the exr plugin requires a buffer which covers the exact size of the current
> > tile. => contiguous data on all tiles
> >
> >
> > I need to have format specific code to arrange data so its works, using
> > OIIO::copy_image. Is it intended, or is it a bug ?
> >
> > Michel
> >
>
> --
> Larry Gritz
> [email protected]
>
>
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
>
> _______________________________________________
> 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