

def testAffectDataWindow(self):
    i = GafferImage.ImageReader()
    i['fileName'].setValue(self.imageFileUndersizeDataWindow)
    crop = GafferImage.Crop()
    crop['in'].setInput(i['out'])
    crop['areaSource'].setValue(GafferImage.Crop.AreaSource.Area)
    crop['area'].setValue(IECore.Box2i(IECore.V2i(40), IECore.V2i(50)))
    crop['affectDataWindow'].setValue(True)
    crop['affectDisplayWindow'].setValue(False)
    self.assertEqual(crop['out']['dataWindow'].getValue(), IECore.Box2i(IECore.V2i(40), IECore.V2i(50)))
    self.assertEqual(i['out']['format'].getValue(), crop['out']['format'].getValue())

dataset/ETHPy150Open ImageEngine/gaffer/python/GafferImageTest/CropTest.py CropTest.testAffectDataWindow/original