Skip to content

Commit

Permalink
DisplayTransformTest : Fix for new defaults for view and display
Browse files Browse the repository at this point in the history
This should have been updated in 6c5323c. Removing rather than updating `testImageHashPassThrough` because it didn't add any value over `testHashPassThrough`.
  • Loading branch information
johnhaddon committed Jun 26, 2023
1 parent 05d6a64 commit 00095c1
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions python/GafferImageTest/DisplayTransformTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ def test( self ) :
o = GafferImage.DisplayTransform()
o["in"].setInput( n["out"] )

self.assertEqual( orig, GafferImage.ImageAlgo.image( o["out"] ) )

o["inputColorSpace"].setValue( "scene_linear" )
o["display"].setValue( "sRGB - Display" )
o["view"].setValue( "ACES 1.0 - SDR Video" )
Expand All @@ -90,6 +88,9 @@ def testHashPassThrough( self ) :
o = GafferImage.DisplayTransform()
o["in"].setInput( n["out"] )

o["display"].setValue( "sRGB - Display" )
o["view"].setValue( "Raw" ) # No-op view

self.assertImageHashesEqual( n["out"], o["out"] )
self.assertImagesEqual( n["out"], o["out"] )

Expand All @@ -107,22 +108,6 @@ def testHashPassThrough( self ) :
self.assertEqual( n["out"]["metadata"].getValue(), o["out"]["metadata"].getValue() )
self.assertEqual( n["out"]['channelNames'].hash(), o["out"]['channelNames'].hash() )

def testImageHashPassThrough( self ) :

i = GafferImage.ImageReader()
i["fileName"].setValue( self.imageFile )

o = GafferImage.DisplayTransform()
o["in"].setInput( i["out"] )

self.assertEqual( GafferImage.ImageAlgo.imageHash( i["out"] ), GafferImage.ImageAlgo.imageHash( o["out"] ) )

o["inputColorSpace"].setValue( "scene_linear" )
o["display"].setValue( "sRGB - Display" )
o["view"].setValue( "ACES 1.0 - SDR Video" )

self.assertNotEqual( GafferImage.ImageAlgo.imageHash( i["out"] ), GafferImage.ImageAlgo.imageHash( o["out"] ) )

def testChannelsAreSeparate( self ) :

i = GafferImage.ImageReader()
Expand Down

0 comments on commit 00095c1

Please sign in to comment.