mapnik/mapnik — pull request #1539 by lightmare (2012-10-16 17:58:21+00:00)
Title: Image filters and compositing tests on New Zealand

1. utilities.run_tests()
To be used in python tests for separate runs. It doesn't blow up on the first exception, just prints a red message, traceback, and continues with the next test.

2. utilities.side_by_side_image()
Used to save a combined reference+failed image in /tmp for preview.

3. New Zealand taken off Natural Earth's 50m shapefiles, used by the following tests.

4. compositing_test.test_style_level_comp_op()
Similar to test_compare_images(), but loads a map and loops though comp-op's in one of its styles. Apparently `color`, `grain-merge`, `hue`, `saturation` and `value` need fixing, they don't play well with alpha.

5. image_filter_test.test_style_level_image_filter()
Loops through image filters applied to city markers and labels. Most of these samples look terrible because source style buffers are mostly transparent and the filters ignore alpha. Only `agg-stack-blur` looks ok with alpha, and `[xy]-gradient` set alpha to 255 on purpose I think (I used `hard-light` and `overlay` compositing, so that gradient filter doesn't spill 50% gray all over the image). I'm going to fix at least `gray` and the four simple 3x3 matrix filters later.

6. minor fix to svg rendering output, it generated `/tmp/%s.svg`.