-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #380 from wiredfool/lcms2
LCMS1 replaced with LCMS2
- Loading branch information
Showing
17 changed files
with
432 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
from tester import * | ||
|
||
from PIL import Image | ||
|
||
def test_white(): | ||
i = Image.open('Tests/images/lab.tif') | ||
|
||
bits = i.load() | ||
|
||
assert_equal(i.mode, 'LAB') | ||
|
||
assert_equal(i.getbands(), ('L','A', 'B')) | ||
|
||
k = i.getpixel((0,0)) | ||
assert_equal(k, (255,128,128)) | ||
|
||
L = i.getdata(0) | ||
a = i.getdata(1) | ||
b = i.getdata(2) | ||
|
||
assert_equal(list(L), [255]*100) | ||
assert_equal(list(a), [128]*100) | ||
assert_equal(list(b), [128]*100) | ||
|
||
|
||
def test_green(): | ||
# l= 50 (/100), a = -100 (-128 .. 128) b=0 in PS | ||
# == RGB: 0, 152, 117 | ||
i = Image.open('Tests/images/lab-green.tif') | ||
|
||
k = i.getpixel((0,0)) | ||
assert_equal(k, (128,28,128)) | ||
|
||
|
||
def test_red(): | ||
# l= 50 (/100), a = 100 (-128 .. 128) b=0 in PS | ||
# == RGB: 255, 0, 124 | ||
i = Image.open('Tests/images/lab-red.tif') | ||
|
||
k = i.getpixel((0,0)) | ||
assert_equal(k, (128,228,128)) |
Oops, something went wrong.