mapnik/tests/python_tests/grayscale_test.py
Dane Springmeyer 71e7faed0d Merge branch 'master' of github.com:mapnik/mapnik into release/image_data_any
Conflicts:
	tests/python_tests/image_test.py
	tests/python_tests/image_tiff_test.py
	tests/visual_tests/images/tiff-opaque-edge-raster2-600-400-1.0-agg-reference.png
	tests/visual_tests/images/tiff-opaque-edge-raster2-600-400-2.0-agg-reference.png
2015-02-03 00:05:15 -08:00

13 lines
359 B
Python

import mapnik
from nose.tools import eq_
from utilities import run_all
def test_grayscale_conversion():
im = mapnik.Image(2,2)
im.fill(mapnik.Color('white'))
im.set_grayscale_to_alpha()
pixel = im.get_pixel(0,0)
eq_((pixel >> 24) & 0xff,255);
if __name__ == "__main__":
exit(run_all(eval(x) for x in dir() if x.startswith("test_")))