mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 18:56:17 +03:00
fix spelling error
This commit is contained in:
parent
37698d8395
commit
9947794ccd
|
@ -255,7 +255,7 @@ class CoreResampleAlphaCorrectTest(PillowTestCase):
|
||||||
self.run_levels_case(case.resize((512, 32), Image.BICUBIC))
|
self.run_levels_case(case.resize((512, 32), Image.BICUBIC))
|
||||||
self.run_levels_case(case.resize((512, 32), Image.LANCZOS))
|
self.run_levels_case(case.resize((512, 32), Image.LANCZOS))
|
||||||
|
|
||||||
def make_dity_case(self, mode, clean_pixel, dirty_pixel):
|
def make_dirty_case(self, mode, clean_pixel, dirty_pixel):
|
||||||
i = Image.new(mode, (64, 64), dirty_pixel)
|
i = Image.new(mode, (64, 64), dirty_pixel)
|
||||||
px = i.load()
|
px = i.load()
|
||||||
xdiv4 = i.size[0] // 4
|
xdiv4 = i.size[0] // 4
|
||||||
|
@ -265,7 +265,7 @@ class CoreResampleAlphaCorrectTest(PillowTestCase):
|
||||||
px[x + xdiv4, y + ydiv4] = clean_pixel
|
px[x + xdiv4, y + ydiv4] = clean_pixel
|
||||||
return i
|
return i
|
||||||
|
|
||||||
def run_dity_case(self, i, clean_pixel):
|
def run_dirty_case(self, i, clean_pixel):
|
||||||
px = i.load()
|
px = i.load()
|
||||||
for y in range(i.size[1]):
|
for y in range(i.size[1]):
|
||||||
for x in range(i.size[0]):
|
for x in range(i.size[0]):
|
||||||
|
@ -275,20 +275,20 @@ class CoreResampleAlphaCorrectTest(PillowTestCase):
|
||||||
self.assertEqual(px[x, y][:3], clean_pixel, message)
|
self.assertEqual(px[x, y][:3], clean_pixel, message)
|
||||||
|
|
||||||
def test_dirty_pixels_rgba(self):
|
def test_dirty_pixels_rgba(self):
|
||||||
case = self.make_dity_case('RGBA', (255, 255, 0, 128), (0, 0, 255, 0))
|
case = self.make_dirty_case('RGBA', (255, 255, 0, 128), (0, 0, 255, 0))
|
||||||
self.run_dity_case(case.resize((20, 20), Image.BOX), (255, 255, 0))
|
self.run_dirty_case(case.resize((20, 20), Image.BOX), (255, 255, 0))
|
||||||
self.run_dity_case(case.resize((20, 20), Image.BILINEAR), (255, 255, 0))
|
self.run_dirty_case(case.resize((20, 20), Image.BILINEAR), (255, 255, 0))
|
||||||
self.run_dity_case(case.resize((20, 20), Image.HAMMING), (255, 255, 0))
|
self.run_dirty_case(case.resize((20, 20), Image.HAMMING), (255, 255, 0))
|
||||||
self.run_dity_case(case.resize((20, 20), Image.BICUBIC), (255, 255, 0))
|
self.run_dirty_case(case.resize((20, 20), Image.BICUBIC), (255, 255, 0))
|
||||||
self.run_dity_case(case.resize((20, 20), Image.LANCZOS), (255, 255, 0))
|
self.run_dirty_case(case.resize((20, 20), Image.LANCZOS), (255, 255, 0))
|
||||||
|
|
||||||
def test_dirty_pixels_la(self):
|
def test_dirty_pixels_la(self):
|
||||||
case = self.make_dity_case('LA', (255, 128), (0, 0))
|
case = self.make_dirty_case('LA', (255, 128), (0, 0))
|
||||||
self.run_dity_case(case.resize((20, 20), Image.BOX), (255,))
|
self.run_dirty_case(case.resize((20, 20), Image.BOX), (255,))
|
||||||
self.run_dity_case(case.resize((20, 20), Image.BILINEAR), (255,))
|
self.run_dirty_case(case.resize((20, 20), Image.BILINEAR), (255,))
|
||||||
self.run_dity_case(case.resize((20, 20), Image.HAMMING), (255,))
|
self.run_dirty_case(case.resize((20, 20), Image.HAMMING), (255,))
|
||||||
self.run_dity_case(case.resize((20, 20), Image.BICUBIC), (255,))
|
self.run_dirty_case(case.resize((20, 20), Image.BICUBIC), (255,))
|
||||||
self.run_dity_case(case.resize((20, 20), Image.LANCZOS), (255,))
|
self.run_dirty_case(case.resize((20, 20), Image.LANCZOS), (255,))
|
||||||
|
|
||||||
|
|
||||||
class CoreResamplePassesTest(PillowTestCase):
|
class CoreResamplePassesTest(PillowTestCase):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user