Exemplo n.º 1
0
    def test_resize_animated_gif(self):
        with open('tests/images/newtons_cradle.gif', 'rb') as f:
            backend = wand_backend.WandBackend.from_file(f)

        wand_backend.resize(self.backend, (100, 75))

        self.assertTrue(wand_backend.has_animation(backend))
Exemplo n.º 2
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)
Exemplo n.º 3
0
 def test_has_animation(self):
     has_animation = wand_backend.has_animation(self.backend)
     self.assertFalse(has_animation)