( self )
| 493 | self.tearDown() |
| 494 | |
| 495 | def testGreyscaleJPG( self ) : |
| 496 | |
| 497 | displayWindow = imath.Box2i( |
| 498 | imath.V2i( 0, 0 ), |
| 499 | imath.V2i( 199, 99 ) |
| 500 | ) |
| 501 | |
| 502 | dataWindow = displayWindow |
| 503 | |
| 504 | imgOrig = self.__makeGreyscaleImage( dataWindow, displayWindow ) |
| 505 | |
| 506 | w = IECore.Writer.create( imgOrig, os.path.join( "test", "IECoreImage", "data", "jpg", "output.jpg" ) ) |
| 507 | self.assertIsInstance( w, IECoreImage.ImageWriter ) |
| 508 | |
| 509 | w.write() |
| 510 | |
| 511 | self.assertTrue( os.path.exists( os.path.join( "test", "IECoreImage", "data", "jpg", "output.jpg" ) ) ) |
| 512 | |
| 513 | r = IECore.Reader.create( os.path.join( "test", "IECoreImage", "data", "jpg", "output.jpg" ) ) |
| 514 | imgNew = r.read() |
| 515 | |
| 516 | channelNames = r.channelNames() |
| 517 | self.assertEqual( len(channelNames), 1 ) |
| 518 | |
| 519 | self.__verifyImageRGB( imgNew, imgOrig ) |
| 520 | |
| 521 | @unittest.skipIf( not os.path.exists( os.environ.get( "OCIO", "" ) ), "Insufficient color specification. Linear -> Cineon conversion is not possible with an OCIO config" ) |
| 522 | def testDPX( self ) : |
nothing calls this directly
no test coverage detected