Skip to content

Commit

Permalink
Convert png to 32 bit to avoid palette differences.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-phaf committed Jun 29, 2023
1 parent 953578a commit 71fef57
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/AdagucTests/TestWMS.py
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ def test_WMSGetMapWithShowLegendSecondLayer_testdatanc(self):
self.assertEqual(status, 0)

status, data, headers = AdagucTestTools().runADAGUCServer(
"source=testdata.nc&SERVICE=WMS&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=geojsonbaselayer,testdata&WIDTH=256&HEIGHT=256&CRS=EPSG%3A4326&BBOX=30,-30,75,30&STYLES=testdata_style_2/shadedcontour&FORMAT=image/png&TRANSPARENT=FALSE&showlegend=testdata",
"source=testdata.nc&SERVICE=WMS&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=geojsonbaselayer,testdata&WIDTH=256&HEIGHT=256&CRS=EPSG%3A4326&BBOX=30,-30,75,30&STYLES=testdata_style_2/shadedcontour&FORMAT=image/png32&TRANSPARENT=FALSE&showlegend=testdata",
{
'ADAGUC_CONFIG':
ADAGUC_PATH + '/data/config/adaguc.tests.autostyle.xml'
Expand Down Expand Up @@ -1842,12 +1842,12 @@ def test_WMSGetMap_dashed_contour_lines(self):

filename = "test_WMSGetMap_dashed_contour_lines.png"
status, data, headers = AdagucTestTools().runADAGUCServer(
"dataset=adaguc.tests.dashedcontourlines&SERVICE=WMS&&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=baselayer,dashed_contour_lines,overlay&WIDTH=773&HEIGHT=927&CRS=EPSG%3A3857&BBOX=-1572926.437674431,4261090.143221738,2101038.6845761645,8666996.570552012&STYLES=testdata_style_manycontours%2Fcontour&FORMAT=image/png&TRANSPARENT=TRUE&",
"dataset=adaguc.tests.dashedcontourlines&SERVICE=WMS&&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=baselayer,dashed_contour_lines,overlay&WIDTH=773&HEIGHT=927&CRS=EPSG%3A3857&BBOX=-1572926.437674431,4261090.143221738,2101038.6845761645,8666996.570552012&STYLES=testdata_style_manycontours%2Fcontour&FORMAT=image/png32&TRANSPARENT=TRUE&",
env=env)
AdagucTestTools().writetofile(self.testresultspath + filename,
data.getvalue())
self.assertEqual(status, 0)
self.assertTrue(AdagucTestTools().compareImage(
self.expectedoutputsspath + filename,
self.testresultspath + filename,
64, 0.001)) # Allowed pixel difference is huge, but only for very small number of pixels
3, 0.02)) # Allowed pixel difference is huge, but only for very small number of pixels
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 71fef57

Please sign in to comment.