MCPcopy Create free account
hub / github.com/ImageEngine/cortex / testAlphaTIF

Method testAlphaTIF

test/IECoreImage/ImageWriterTest.py:644–664  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

642 self.tearDown()
643
644 def testAlphaTIF( self ) :
645
646 displayWindow = imath.Box2i(
647 imath.V2i( 0, 0 ),
648 imath.V2i( 99, 99 )
649 )
650
651 dataWindow = displayWindow
652
653 imgOrig = self.__makeFloatImage( dataWindow, displayWindow, withAlpha = True )
654
655 w = IECore.Writer.create( imgOrig, os.path.join( "test", "IECoreImage", "data", "tiff", "output.tif" ) )
656 self.assertIsInstance( w, IECoreImage.ImageWriter )
657 w.write()
658 self.assertTrue( os.path.exists( os.path.join( "test", "IECoreImage", "data", "tiff", "output.tif" ) ) )
659
660 # Now we've written the image, verify the rgb
661 imgNew = IECore.Reader.create( os.path.join( "test", "IECoreImage", "data", "tiff", "output.tif" ) ).read()
662 self.__verifyImageRGB( imgOrig, imgNew )
663
664 self.assertTrue( "A" in imgNew )
665
666 def testGreyscaleTIF( self ) :
667

Callers

nothing calls this directly

Calls 6

__makeFloatImageMethod · 0.95
__verifyImageRGBMethod · 0.95
joinMethod · 0.80
createMethod · 0.45
writeMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected