diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ITEMFONTCOLOR/WMS_GetLegendGraphic_ITEMFONTCOLOR_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ITEMFONTCOLOR/WMS_GetLegendGraphic_ITEMFONTCOLOR_mask.png new file mode 100644 index 00000000000..3433c4ba0e6 Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ITEMFONTCOLOR/WMS_GetLegendGraphic_ITEMFONTCOLOR_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ITEMFONTCOLOR_and_LAYERFONTCOLOR/WMS_GetLegendGraphic_ITEMFONTCOLOR_and_LAYERFONTCOLOR_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ITEMFONTCOLOR_and_LAYERFONTCOLOR/WMS_GetLegendGraphic_ITEMFONTCOLOR_and_LAYERFONTCOLOR_mask.png new file mode 100644 index 00000000000..3433c4ba0e6 Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ITEMFONTCOLOR_and_LAYERFONTCOLOR/WMS_GetLegendGraphic_ITEMFONTCOLOR_and_LAYERFONTCOLOR_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ItemFont/WMS_GetLegendGraphic_ItemFont_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ItemFont/WMS_GetLegendGraphic_ItemFont_mask.png new file mode 100644 index 00000000000..0f10c9abca9 Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ItemFont/WMS_GetLegendGraphic_ItemFont_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_LAYERFONTCOLOR/WMS_GetLegendGraphic_LAYERFONTCOLOR_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_LAYERFONTCOLOR/WMS_GetLegendGraphic_LAYERFONTCOLOR_mask.png new file mode 100644 index 00000000000..3433c4ba0e6 Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_LAYERFONTCOLOR/WMS_GetLegendGraphic_LAYERFONTCOLOR_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_LayerFont/WMS_GetLegendGraphic_LayerFont_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_LayerFont/WMS_GetLegendGraphic_LayerFont_mask.png new file mode 100644 index 00000000000..c5f110d2239 Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_LayerFont/WMS_GetLegendGraphic_LayerFont_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_LayerSpace/WMS_GetLegendGraphic_LayerSpace_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_LayerSpace/WMS_GetLegendGraphic_LayerSpace_mask.png new file mode 100644 index 00000000000..4b3ebe89c66 Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_LayerSpace/WMS_GetLegendGraphic_LayerSpace_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_LayerTitleSpace/WMS_GetLegendGraphic_LayerTitleSpace_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_LayerTitleSpace/WMS_GetLegendGraphic_LayerTitleSpace_mask.png new file mode 100644 index 00000000000..9a0ac4a8eae Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_LayerTitleSpace/WMS_GetLegendGraphic_LayerTitleSpace_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_Legend_Placeholder_Icon/WMS_GetLegendGraphic_Legend_Placeholder_Icon_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_Legend_Placeholder_Icon/WMS_GetLegendGraphic_Legend_Placeholder_Icon_mask.png new file mode 100644 index 00000000000..2ed16060400 Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_Legend_Placeholder_Icon/WMS_GetLegendGraphic_Legend_Placeholder_Icon_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_MetersAtScaleSymbol_DefaultScale/WMS_GetLegendGraphic_MetersAtScaleSymbol_DefaultScale_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_MetersAtScaleSymbol_DefaultScale/WMS_GetLegendGraphic_MetersAtScaleSymbol_DefaultScale_mask.png new file mode 100644 index 00000000000..2249a9beada Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_MetersAtScaleSymbol_DefaultScale/WMS_GetLegendGraphic_MetersAtScaleSymbol_DefaultScale_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_MetersAtScaleSymbol_DefaultScale_2056/WMS_GetLegendGraphic_MetersAtScaleSymbol_DefaultScale_2056_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_MetersAtScaleSymbol_DefaultScale_2056/WMS_GetLegendGraphic_MetersAtScaleSymbol_DefaultScale_2056_mask.png new file mode 100644 index 00000000000..765071af4d9 Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_MetersAtScaleSymbol_DefaultScale_2056/WMS_GetLegendGraphic_MetersAtScaleSymbol_DefaultScale_2056_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_MetersAtScaleSymbol_Scaled/WMS_GetLegendGraphic_MetersAtScaleSymbol_Scaled_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_MetersAtScaleSymbol_Scaled/WMS_GetLegendGraphic_MetersAtScaleSymbol_Scaled_mask.png new file mode 100644 index 00000000000..cd2caf9e48d Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_MetersAtScaleSymbol_Scaled/WMS_GetLegendGraphic_MetersAtScaleSymbol_Scaled_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_MetersAtScaleSymbol_Scaled_2056/WMS_GetLegendGraphic_MetersAtScaleSymbol_Scaled_2056_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_MetersAtScaleSymbol_Scaled_2056/WMS_GetLegendGraphic_MetersAtScaleSymbol_Scaled_2056_mask.png new file mode 100644 index 00000000000..d3b65d0e725 Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_MetersAtScaleSymbol_Scaled_2056/WMS_GetLegendGraphic_MetersAtScaleSymbol_Scaled_2056_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_NoWidthNoHeight/WMS_GetLegendGraphic_NoWidthNoHeight_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_NoWidthNoHeight/WMS_GetLegendGraphic_NoWidthNoHeight_mask.png new file mode 100644 index 00000000000..7435e50a706 Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_NoWidthNoHeight/WMS_GetLegendGraphic_NoWidthNoHeight_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_Regression32020_type1/WMS_GetLegendGraphic_Regression32020_type1_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_Regression32020_type1/WMS_GetLegendGraphic_Regression32020_type1_mask.png new file mode 100644 index 00000000000..9a32c76cf8a Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_Regression32020_type1/WMS_GetLegendGraphic_Regression32020_type1_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_Regression32020_type1_and_3/WMS_GetLegendGraphic_Regression32020_type1_and_3_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_Regression32020_type1_and_3/WMS_GetLegendGraphic_Regression32020_type1_and_3_mask.png new file mode 100644 index 00000000000..f054b2ec0f5 Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_Regression32020_type1_and_3/WMS_GetLegendGraphic_Regression32020_type1_and_3_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_Regression32020_type2/WMS_GetLegendGraphic_Regression32020_type2_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_Regression32020_type2/WMS_GetLegendGraphic_Regression32020_type2_mask.png new file mode 100644 index 00000000000..1b7202b460e Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_Regression32020_type2/WMS_GetLegendGraphic_Regression32020_type2_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_Regression32020_type2_3857/WMS_GetLegendGraphic_Regression32020_type2_3857_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_Regression32020_type2_3857/WMS_GetLegendGraphic_Regression32020_type2_3857_mask.png new file mode 100644 index 00000000000..1b7202b460e Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_Regression32020_type2_3857/WMS_GetLegendGraphic_Regression32020_type2_3857_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_Regression32020_type2_and_3/WMS_GetLegendGraphic_Regression32020_type2_and_3_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_Regression32020_type2_and_3/WMS_GetLegendGraphic_Regression32020_type2_and_3_mask.png new file mode 100644 index 00000000000..d54cc4d5126 Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_Regression32020_type2_and_3/WMS_GetLegendGraphic_Regression32020_type2_and_3_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ScaleSymbol_DefaultMapUnitsPerMillimeter/WMS_GetLegendGraphic_ScaleSymbol_DefaultMapUnitsPerMillimeter_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ScaleSymbol_DefaultMapUnitsPerMillimeter/WMS_GetLegendGraphic_ScaleSymbol_DefaultMapUnitsPerMillimeter_mask.png new file mode 100644 index 00000000000..3066edff0ca Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ScaleSymbol_DefaultMapUnitsPerMillimeter/WMS_GetLegendGraphic_ScaleSymbol_DefaultMapUnitsPerMillimeter_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ScaleSymbol_DefaultScale_2056/WMS_GetLegendGraphic_ScaleSymbol_DefaultScale_2056_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ScaleSymbol_DefaultScale_2056/WMS_GetLegendGraphic_ScaleSymbol_DefaultScale_2056_mask.png new file mode 100644 index 00000000000..3cdab74e3e6 Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ScaleSymbol_DefaultScale_2056/WMS_GetLegendGraphic_ScaleSymbol_DefaultScale_2056_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ScaleSymbol_Max/WMS_GetLegendGraphic_ScaleSymbol_Max_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ScaleSymbol_Max/WMS_GetLegendGraphic_ScaleSymbol_Max_mask.png new file mode 100644 index 00000000000..e383ad9846f Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ScaleSymbol_Max/WMS_GetLegendGraphic_ScaleSymbol_Max_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ScaleSymbol_Min/WMS_GetLegendGraphic_ScaleSymbol_Min_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ScaleSymbol_Min/WMS_GetLegendGraphic_ScaleSymbol_Min_mask.png new file mode 100644 index 00000000000..2cf98018f8b Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ScaleSymbol_Min/WMS_GetLegendGraphic_ScaleSymbol_Min_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ScaleSymbol_Scaled_01/WMS_GetLegendGraphic_ScaleSymbol_Scaled_01_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ScaleSymbol_Scaled_01/WMS_GetLegendGraphic_ScaleSymbol_Scaled_01_mask.png new file mode 100644 index 00000000000..8b4991f181f Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ScaleSymbol_Scaled_01/WMS_GetLegendGraphic_ScaleSymbol_Scaled_01_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ScaleSymbol_Scaled_02/WMS_GetLegendGraphic_ScaleSymbol_Scaled_02_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ScaleSymbol_Scaled_02/WMS_GetLegendGraphic_ScaleSymbol_Scaled_02_mask.png new file mode 100644 index 00000000000..59be08c50eb Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ScaleSymbol_Scaled_02/WMS_GetLegendGraphic_ScaleSymbol_Scaled_02_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ScaleSymbol_Scaled_2056/WMS_GetLegendGraphic_ScaleSymbol_Scaled_2056_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ScaleSymbol_Scaled_2056/WMS_GetLegendGraphic_ScaleSymbol_Scaled_2056_mask.png new file mode 100644 index 00000000000..97fd54a204a Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ScaleSymbol_Scaled_2056/WMS_GetLegendGraphic_ScaleSymbol_Scaled_2056_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ShowFeatureCount/WMS_GetLegendGraphic_ShowFeatureCount_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ShowFeatureCount/WMS_GetLegendGraphic_ShowFeatureCount_mask.png new file mode 100644 index 00000000000..590f80240fb Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_ShowFeatureCount/WMS_GetLegendGraphic_ShowFeatureCount_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_rulelabel_false/WMS_GetLegendGraphic_rulelabel_false_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_rulelabel_false/WMS_GetLegendGraphic_rulelabel_false_mask.png new file mode 100644 index 00000000000..b440478b094 Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_rulelabel_false/WMS_GetLegendGraphic_rulelabel_false_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_test/WMS_GetLegendGraphic_test_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_test/WMS_GetLegendGraphic_test_mask.png new file mode 100644 index 00000000000..f82c212cfc2 Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_test/WMS_GetLegendGraphic_test_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetMap_LabelingOpacities/WMS_GetMap_LabelingOpacities_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetMap_LabelingOpacities/WMS_GetMap_LabelingOpacities_mask.png new file mode 100644 index 00000000000..018720c78f8 Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetMap_LabelingOpacities/WMS_GetMap_LabelingOpacities_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetMap_LabelingOpacities128/WMS_GetMap_LabelingOpacities128_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetMap_LabelingOpacities128/WMS_GetMap_LabelingOpacities128_mask.png new file mode 100644 index 00000000000..a350d96bf67 Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetMap_LabelingOpacities128/WMS_GetMap_LabelingOpacities128_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetMap_Labeling_Complex/WMS_GetMap_Labeling_Complex_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetMap_Labeling_Complex/WMS_GetMap_Labeling_Complex_mask.png index b2b38e45fcd..fa8c8f62fda 100644 Binary files a/tests/testdata/control_images/qgis_server/WMS_GetMap_Labeling_Complex/WMS_GetMap_Labeling_Complex_mask.png and b/tests/testdata/control_images/qgis_server/WMS_GetMap_Labeling_Complex/WMS_GetMap_Labeling_Complex_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetMap_Tiled_Labels_False/WMS_GetMap_Tiled_Labels_False_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetMap_Tiled_Labels_False/WMS_GetMap_Tiled_Labels_False_mask.png index fd9ef707f13..107528767a5 100644 Binary files a/tests/testdata/control_images/qgis_server/WMS_GetMap_Tiled_Labels_False/WMS_GetMap_Tiled_Labels_False_mask.png and b/tests/testdata/control_images/qgis_server/WMS_GetMap_Tiled_Labels_False/WMS_GetMap_Tiled_Labels_False_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetMap_Tiled_Labels_True/WMS_GetMap_Tiled_Labels_True_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetMap_Tiled_Labels_True/WMS_GetMap_Tiled_Labels_True_mask.png index 7e996f1aafc..ecc697caf4f 100644 Binary files a/tests/testdata/control_images/qgis_server/WMS_GetMap_Tiled_Labels_True/WMS_GetMap_Tiled_Labels_True_mask.png and b/tests/testdata/control_images/qgis_server/WMS_GetMap_Tiled_Labels_True/WMS_GetMap_Tiled_Labels_True_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetMap_Tiled_Rotated_Labels_True/WMS_GetMap_Tiled_Rotated_Labels_True_mask.png b/tests/testdata/control_images/qgis_server/WMS_GetMap_Tiled_Rotated_Labels_True/WMS_GetMap_Tiled_Rotated_Labels_True_mask.png new file mode 100644 index 00000000000..b3803a2a246 Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetMap_Tiled_Rotated_Labels_True/WMS_GetMap_Tiled_Rotated_Labels_True_mask.png differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetPrint_Basic_Pdf/WMS_GetPrint_Basic_Pdf.pdf b/tests/testdata/control_images/qgis_server/WMS_GetPrint_Basic_Pdf/WMS_GetPrint_Basic_Pdf.pdf new file mode 100644 index 00000000000..f8f1f05f0ea Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetPrint_Basic_Pdf/WMS_GetPrint_Basic_Pdf.pdf differ diff --git a/tests/testdata/control_images/qgis_server/WMS_GetPrint_Selection_Pdf/WMS_GetPrint_Selection_Pdf.pdf b/tests/testdata/control_images/qgis_server/WMS_GetPrint_Selection_Pdf/WMS_GetPrint_Selection_Pdf.pdf new file mode 100644 index 00000000000..2b31851cc78 Binary files /dev/null and b/tests/testdata/control_images/qgis_server/WMS_GetPrint_Selection_Pdf/WMS_GetPrint_Selection_Pdf.pdf differ