Internal changes

PiperOrigin-RevId: 477924417
This commit is contained in:
Jiuqiang Tang 2022-09-30 08:10:33 +00:00 committed by Sebastian Schmidt
parent 3a3a470a0c
commit 3225372c28

View File

@ -187,16 +187,5 @@ class ImageTest(absltest.TestCase):
gc.collect() gc.collect()
self.assertEqual(sys.getrefcount(rgb_image), initial_ref_count) self.assertEqual(sys.getrefcount(rgb_image), initial_ref_count)
def test_image_create_from_file(self):
image_path = os.path.join(
resources.GetRunfilesDir(),
'mediapipe/tasks/testdata/vision/cat.jpg')
loaded_image = Image.create_from_file(image_path)
self.assertEqual(loaded_image.width, 600)
self.assertEqual(loaded_image.height, 400)
self.assertEqual(loaded_image.channels, 3)
self.assertEqual(loaded_image.image_format, ImageFormat.SRGB)
if __name__ == '__main__': if __name__ == '__main__':
absltest.main() absltest.main()