Exemple #1
0
    def test_transparent_gif(self):
        with open('tests/images/transparent.gif', 'rb') as f:
            backend = wand_backend.WandBackend.from_file(f)

        self.assertTrue(wand_backend.has_alpha(backend))
        self.assertFalse(wand_backend.has_animation(backend))

        # Check that the alpha of pixel 1,1 is 0
        self.assertEqual(backend.image[1][1].alpha, 0)
Exemple #2
0
 def test_has_alpha(self):
     has_alpha = wand_backend.has_alpha(self.backend)
     self.assertTrue(has_alpha)