示例#1
0
    def test_mode_alpha(self):
        image = create_image().convert('RGBA')
        processed = processors.background(
            image, background='#fff', size=(800, 800))
        self.assertEqual(processed.size, (800, 800))
        self.assertEqual(processed.mode, 'RGB')

        image = create_image().convert('LA')
        processed = processors.background(
            image, background='#fff', size=(800, 800))
        self.assertEqual(processed.size, (800, 800))
        self.assertEqual(processed.mode, 'L')
    def test_mode_alpha(self):
        image = create_image().convert('RGBA')
        processed = processors.background(image,
                                          background='#fff',
                                          size=(800, 800))
        self.assertEqual(processed.size, (800, 800))
        self.assertEqual(processed.mode, 'RGB')

        image = create_image().convert('LA')
        processed = processors.background(image,
                                          background='#fff',
                                          size=(800, 800))
        self.assertEqual(processed.size, (800, 800))
        self.assertEqual(processed.mode, 'L')
 def test_grayscale(self):
     image = create_image().convert('L')
     processed = processors.background(image,
                                       background='#fff',
                                       size=(800, 800))
     self.assertEqual(processed.size, (800, 800))
     self.assertEqual(processed.mode, 'L')
示例#4
0
 def test_grayscale(self):
     image = create_image().convert('L')
     processed = processors.background(
         image, background='#fff', size=(800, 800))
     self.assertEqual(processed.size, (800, 800))
     self.assertEqual(processed.mode, 'L')
示例#5
0
 def test_basic(self):
     image = create_image()
     processed = processors.background(
         image, background='#fff', size=(800, 800))
     self.assertEqual(processed.size, (800, 800))
 def test_basic(self):
     image = create_image()
     processed = processors.background(image,
                                       background='#fff',
                                       size=(800, 800))
     self.assertEqual(processed.size, (800, 800))