( self )
| 346 | self.assertTrue( r.read().channelsValid() ) |
| 347 | |
| 348 | def testFramesPerSecond( self ): |
| 349 | # read an image that have the FramesPerSecond set and ensure the values are correctly identified |
| 350 | r = IECore.Reader.create( os.path.join( "test", "IECoreImage", "data", "exr", "rationalFramesPerSecond.exr" ) ) |
| 351 | h1 = r.readHeader() |
| 352 | self.assertTrue( "framesPerSecond" in h1 ) |
| 353 | self.assertEqual( h1["framesPerSecond"].getInterpretation(), IECore.GeometricData.Interpretation.Rational ) |
| 354 | |
| 355 | img = r.read() |
| 356 | |
| 357 | # write the image to filesystem and read it again to check that the value was set correctly |
| 358 | w = IECore.Writer.create( img, os.path.join( "test", "IECoreImage", "data", "exr", "output.exr" ) ) |
| 359 | w.write() |
| 360 | |
| 361 | r2 = IECore.Reader.create( os.path.join( "test", "IECoreImage", "data", "exr", "output.exr" ) ) |
| 362 | h2 = r2.readHeader() |
| 363 | self.assertTrue( "framesPerSecond" in h2 ) |
| 364 | self.assertEqual( h2["framesPerSecond"].getInterpretation(), IECore.GeometricData.Interpretation.Rational ) |
| 365 | |
| 366 | self.assertEqual( h1["framesPerSecond"], h2["framesPerSecond"] ) |
| 367 | |
| 368 | def testMiplevel( self ) : |
| 369 |
nothing calls this directly
no test coverage detected