update tests images after change made to agg src_over in #1452, refs #1369

This commit is contained in:
Dane Springmeyer 2012-08-31 18:16:49 -07:00
parent bc3c7b4b40
commit 6450d33462
8 changed files with 35 additions and 0 deletions

View file

@ -0,0 +1,24 @@
<Map background-color="#fcc" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
<!-- Asia -->
<Style name="style" image-filters="agg-stack-blur(4,4)">
<Rule>
<Filter>([REGION]=142)</Filter>
<PolygonSymbolizer fill="yellow"/>
</Rule>
</Style>
<!-- Not Asia -->
<Style name="style2" opacity=".5">
<Rule>
<Filter>([REGION]!=142)</Filter>
<PolygonSymbolizer fill="#fff"/>
</Rule>
</Style>
<Layer name="world" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
<StyleName>style</StyleName>
<StyleName>style2</StyleName>
<Datasource>
<Parameter name="file">../shp/world_merc</Parameter>
<Parameter name="type">shape</Parameter>
</Datasource>
</Layer>
</Map>

View file

@ -145,6 +145,17 @@ def test_pre_multiply_status_of_map2():
mapnik.render(m,im)
eq_(validate_pixels_are_not_premultiplied(im),True)
def test_style_level_opacity():
m = mapnik.Map(512,512)
mapnik.load_map(m,'../data/good_maps/style_level_opacity_and_blur.xml')
m.zoom_all()
im = mapnik.Image(512,512)
mapnik.render(m,im)
actual = '/tmp/mapnik-style-level-opacity.png'
expected = 'images/support/mapnik-style-level-opacity.png'
im.save(actual)
expected_im = mapnik.Image.open(expected)
eq_(im.tostring(),expected_im.tostring(), 'failed comparing actual (%s) and expected (%s)' % (actual,'tests/python_tests/'+ expected))
if __name__ == "__main__":
setup()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB