mirror of
https://github.com/mapnik/mapnik.git
synced 2025-12-08 20:13:09 +00:00
add grayscale conversion test - refs #1454
This commit is contained in:
parent
6450d33462
commit
d054178a75
12
tests/python_tests/grayscale_test.py
Normal file
12
tests/python_tests/grayscale_test.py
Normal file
@ -0,0 +1,12 @@
|
||||
import mapnik
|
||||
from nose.tools import *
|
||||
|
||||
def test_grayscale_conversion():
|
||||
im = mapnik.Image(2,2)
|
||||
im.background = mapnik.Color('white')
|
||||
im.set_grayscale_to_alpha()
|
||||
pixel = im.get_pixel(0,0)
|
||||
eq_((pixel >> 24) & 0xff,255);
|
||||
|
||||
if __name__ == "__main__":
|
||||
[eval(run)() for run in dir() if 'test_' in run]
|
||||
Loading…
x
Reference in New Issue
Block a user