( self )
| 664 | self.assertTrue( "A" in imgNew ) |
| 665 | |
| 666 | def testGreyscaleTIF( self ) : |
| 667 | |
| 668 | displayWindow = imath.Box2i( |
| 669 | imath.V2i( 0, 0 ), |
| 670 | imath.V2i( 199, 99 ) |
| 671 | ) |
| 672 | |
| 673 | dataWindow = displayWindow |
| 674 | |
| 675 | imgOrig = self.__makeGreyscaleImage( dataWindow, displayWindow ) |
| 676 | |
| 677 | w = IECore.Writer.create( imgOrig, os.path.join( "test", "IECoreImage", "data", "tiff", "output.tif" ) ) |
| 678 | self.assertIsInstance( w, IECoreImage.ImageWriter ) |
| 679 | |
| 680 | w.write() |
| 681 | |
| 682 | self.assertTrue( os.path.exists( os.path.join( "test", "IECoreImage", "data", "tiff", "output.tif" ) ) ) |
| 683 | |
| 684 | r = IECore.Reader.create( os.path.join( "test", "IECoreImage", "data", "tiff", "output.tif" ) ) |
| 685 | imgNew = r.read() |
| 686 | |
| 687 | channelNames = r.channelNames() |
| 688 | self.assertEqual( len(channelNames), 1 ) |
| 689 | |
| 690 | def testRoundTripTIF( self ) : |
| 691 |
nothing calls this directly
no test coverage detected