mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
Adjust test for the gamma of 2.2 encoded into the file
This commit is contained in:
parent
b7d14b04b6
commit
2d02f4ea9b
|
@ -1,6 +1,6 @@
|
|||
from helper import unittest, PillowTestCase, hopper
|
||||
|
||||
from PIL import Image, MicImagePlugin
|
||||
from PIL import Image, ImagePalette, MicImagePlugin
|
||||
|
||||
TEST_FILE = "Tests/images/hopper.mic"
|
||||
|
||||
|
@ -14,8 +14,12 @@ class TestFileMic(PillowTestCase):
|
|||
self.assertEqual(im.size, (128, 128))
|
||||
self.assertEqual(im.format, "MIC")
|
||||
|
||||
# Adjust for the gamma of 2.2 encoded into the file
|
||||
lut = ImagePalette.make_gamma_lut(1/2.2)
|
||||
im = Image.merge('RGBA', [chan.point(lut) for chan in im.split()])
|
||||
|
||||
im2 = hopper("RGBA")
|
||||
self.assert_image_similar(im, im2, 123.5)
|
||||
self.assert_image_similar(im, im2, 10)
|
||||
|
||||
def test_n_frames(self):
|
||||
im = Image.open(TEST_FILE)
|
||||
|
|
Loading…
Reference in New Issue
Block a user