I had forgotten that we have a setDisplayWindow() method which makes you right. It is a bug.

________________________________
From: John Haddon [notifications@github.com]
Sent: Wednesday, May 15, 2013 4:57 PM
To: ImageEngine/gaffer
Cc: Luke Goddard
Subject: Re: [gaffer] Fixed issue #280: Display now obeys the default format. (#297)


In include/GafferImage/ImagePrimitiveSource.inl:

> @@ -163,8 +163,9 @@ GafferImage::Format ImagePrimitiveSource<BaseType>::computeFormat( const Gaffer:
>       if( image )
>       {
>               result = image->getDisplayWindow();
> +             return GafferImage::Format( result.size().x+1, result.size().y+1 );


I don't have a good use case off the top of my head. But our image specification is closely tied to the Cortex image specification, the OpenEXR specification and the OIIO specification. All three of these allow non-zero display window origins, so we need to support it too. Our Format class stores the display window as a Box2i and has a setDisplayWindow( Box2i ) method, so any time we don't honour that it has to be classified as a bug.

—
Reply to this email directly or view it on GitHub<https://github.com/ImageEngine/gaffer/pull/297/files#r4247110>.