diff --git a/src/image_util.cpp b/src/image_util.cpp index 16329473f..f25463d43 100644 --- a/src/image_util.cpp +++ b/src/image_util.cpp @@ -620,19 +620,12 @@ void save_to_stream(T const& image, { #if defined(HAVE_WEBP) WebPConfig config; - if (!WebPConfigPreset(&config, WEBP_PRESET_DEFAULT, 90)) + // Default values set here will be lossless=0 and quality=75 (as least as of webp v0.3.1) + if (!WebPConfigInit(&config)) { throw std::runtime_error("version mismatch"); } - /* - WEBP_HINT_DEFAULT = 0, // default preset. - WEBP_HINT_PICTURE, // digital picture, like portrait, inner shot - WEBP_HINT_PHOTO, // outdoor photograph, with natural lighting - WEBP_HINT_GRAPH, // Discrete tone image (graph, map-tile etc). - WEBP_HINT_LAST - */ - config.image_hint = WEBP_HINT_GRAPH; - config.method = 3; + // see for more details: https://github.com/mapnik/mapnik/wiki/Image-IO#webp-output-options bool alpha = true; handle_webp_options(t,config,alpha); save_as_webp(stream,image,config,alpha); diff --git a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+alpha=false.webp b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+alpha=false.webp index 69829e529..40e66e869 100644 Binary files a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+alpha=false.webp and b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+alpha=false.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+alpha_compression=0.webp b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+alpha_compression=0.webp index 69829e529..40e66e869 100644 Binary files a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+alpha_compression=0.webp and b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+alpha_compression=0.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+alpha_filtering=2.webp b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+alpha_filtering=2.webp index 69829e529..40e66e869 100644 Binary files a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+alpha_filtering=2.webp and b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+alpha_filtering=2.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+alpha_quality=50.webp b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+alpha_quality=50.webp index 69829e529..40e66e869 100644 Binary files a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+alpha_quality=50.webp and b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+alpha_quality=50.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+autofilter=0.webp b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+autofilter=0.webp index 69829e529..40e66e869 100644 Binary files a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+autofilter=0.webp and b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+autofilter=0.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+filter_sharpness=4.webp b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+filter_sharpness=4.webp index 34d92449c..70902fa1f 100644 Binary files a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+filter_sharpness=4.webp and b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+filter_sharpness=4.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+filter_strength=50.webp b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+filter_strength=50.webp index 267c2526c..323c0b9d9 100644 Binary files a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+filter_strength=50.webp and b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+filter_strength=50.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+filter_type=1+autofilter=1.webp b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+filter_type=1+autofilter=1.webp index cbe2812be..6df857bf7 100644 Binary files a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+filter_type=1+autofilter=1.webp and b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+filter_type=1+autofilter=1.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+method=0.webp b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+method=0.webp new file mode 100644 index 000000000..b49d76453 Binary files /dev/null and b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+method=0.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+method=6.webp b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+method=6.webp new file mode 100644 index 000000000..a539e479d Binary files /dev/null and b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+method=6.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+partition_limit=50.webp b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+partition_limit=50.webp index c14675134..1e0b072fc 100644 Binary files a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+partition_limit=50.webp and b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+partition_limit=50.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+partitions=3.webp b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+partitions=3.webp index 69829e529..40e66e869 100644 Binary files a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+partitions=3.webp and b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+partitions=3.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+pass=10.webp b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+pass=10.webp index 69829e529..40e66e869 100644 Binary files a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+pass=10.webp and b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+pass=10.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+preprocessing=1.webp b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+preprocessing=1.webp index 63ec79f70..4c2004e0a 100644 Binary files a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+preprocessing=1.webp and b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+preprocessing=1.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+quality=64.webp b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+quality=64.webp index 2b6ea040b..7ab1e8836 100644 Binary files a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+quality=64.webp and b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+quality=64.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+segments=3.webp b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+segments=3.webp index c65f66427..c31101de4 100644 Binary files a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+segments=3.webp and b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+segments=3.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+sns_strength=50.webp b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+sns_strength=50.webp index 69829e529..40e66e869 100644 Binary files a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+sns_strength=50.webp and b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+sns_strength=50.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+target_PSNR=.5.webp b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+target_PSNR=.5.webp index e63841d49..7375c6645 100644 Binary files a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+target_PSNR=.5.webp and b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+target_PSNR=.5.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+target_size=100.webp b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+target_size=100.webp index e63841d49..7375c6645 100644 Binary files a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+target_size=100.webp and b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp+target_size=100.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp.webp b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp.webp index 69829e529..40e66e869 100644 Binary files a/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp.webp and b/tests/python_tests/images/support/encoding-opts/aerial_rgba-webp.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/blank-webp+alpha=false.webp b/tests/python_tests/images/support/encoding-opts/blank-webp+alpha=false.webp index 9b3588554..e58fe603b 100644 Binary files a/tests/python_tests/images/support/encoding-opts/blank-webp+alpha=false.webp and b/tests/python_tests/images/support/encoding-opts/blank-webp+alpha=false.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/blank-webp+alpha_compression=0.webp b/tests/python_tests/images/support/encoding-opts/blank-webp+alpha_compression=0.webp index d2eb2bba4..6c785a1ad 100644 Binary files a/tests/python_tests/images/support/encoding-opts/blank-webp+alpha_compression=0.webp and b/tests/python_tests/images/support/encoding-opts/blank-webp+alpha_compression=0.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/blank-webp+alpha_filtering=2.webp b/tests/python_tests/images/support/encoding-opts/blank-webp+alpha_filtering=2.webp index ce65bf5df..57e0295b0 100644 Binary files a/tests/python_tests/images/support/encoding-opts/blank-webp+alpha_filtering=2.webp and b/tests/python_tests/images/support/encoding-opts/blank-webp+alpha_filtering=2.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/blank-webp+alpha_quality=50.webp b/tests/python_tests/images/support/encoding-opts/blank-webp+alpha_quality=50.webp index 25e51cfd5..94030b511 100644 Binary files a/tests/python_tests/images/support/encoding-opts/blank-webp+alpha_quality=50.webp and b/tests/python_tests/images/support/encoding-opts/blank-webp+alpha_quality=50.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/blank-webp+autofilter=0.webp b/tests/python_tests/images/support/encoding-opts/blank-webp+autofilter=0.webp index ce65bf5df..57e0295b0 100644 Binary files a/tests/python_tests/images/support/encoding-opts/blank-webp+autofilter=0.webp and b/tests/python_tests/images/support/encoding-opts/blank-webp+autofilter=0.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/blank-webp+filter_sharpness=4.webp b/tests/python_tests/images/support/encoding-opts/blank-webp+filter_sharpness=4.webp index 548500242..96ba019ed 100644 Binary files a/tests/python_tests/images/support/encoding-opts/blank-webp+filter_sharpness=4.webp and b/tests/python_tests/images/support/encoding-opts/blank-webp+filter_sharpness=4.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/blank-webp+filter_strength=50.webp b/tests/python_tests/images/support/encoding-opts/blank-webp+filter_strength=50.webp index c9136a5d7..9fb582130 100644 Binary files a/tests/python_tests/images/support/encoding-opts/blank-webp+filter_strength=50.webp and b/tests/python_tests/images/support/encoding-opts/blank-webp+filter_strength=50.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/blank-webp+filter_type=1+autofilter=1.webp b/tests/python_tests/images/support/encoding-opts/blank-webp+filter_type=1+autofilter=1.webp index 5c87c9e5e..3b8f99cda 100644 Binary files a/tests/python_tests/images/support/encoding-opts/blank-webp+filter_type=1+autofilter=1.webp and b/tests/python_tests/images/support/encoding-opts/blank-webp+filter_type=1+autofilter=1.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/blank-webp+method=0.webp b/tests/python_tests/images/support/encoding-opts/blank-webp+method=0.webp new file mode 100644 index 000000000..5afc8db2e Binary files /dev/null and b/tests/python_tests/images/support/encoding-opts/blank-webp+method=0.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/blank-webp+method=6.webp b/tests/python_tests/images/support/encoding-opts/blank-webp+method=6.webp new file mode 100644 index 000000000..455af2b23 Binary files /dev/null and b/tests/python_tests/images/support/encoding-opts/blank-webp+method=6.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/blank-webp+partition_limit=50.webp b/tests/python_tests/images/support/encoding-opts/blank-webp+partition_limit=50.webp index ce65bf5df..57e0295b0 100644 Binary files a/tests/python_tests/images/support/encoding-opts/blank-webp+partition_limit=50.webp and b/tests/python_tests/images/support/encoding-opts/blank-webp+partition_limit=50.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/blank-webp+partitions=3.webp b/tests/python_tests/images/support/encoding-opts/blank-webp+partitions=3.webp index ce65bf5df..57e0295b0 100644 Binary files a/tests/python_tests/images/support/encoding-opts/blank-webp+partitions=3.webp and b/tests/python_tests/images/support/encoding-opts/blank-webp+partitions=3.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/blank-webp+pass=10.webp b/tests/python_tests/images/support/encoding-opts/blank-webp+pass=10.webp index ce65bf5df..57e0295b0 100644 Binary files a/tests/python_tests/images/support/encoding-opts/blank-webp+pass=10.webp and b/tests/python_tests/images/support/encoding-opts/blank-webp+pass=10.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/blank-webp+preprocessing=1.webp b/tests/python_tests/images/support/encoding-opts/blank-webp+preprocessing=1.webp index 9b67423fa..57e0295b0 100644 Binary files a/tests/python_tests/images/support/encoding-opts/blank-webp+preprocessing=1.webp and b/tests/python_tests/images/support/encoding-opts/blank-webp+preprocessing=1.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/blank-webp+quality=64.webp b/tests/python_tests/images/support/encoding-opts/blank-webp+quality=64.webp index e69de29bb..8f234b648 100644 Binary files a/tests/python_tests/images/support/encoding-opts/blank-webp+quality=64.webp and b/tests/python_tests/images/support/encoding-opts/blank-webp+quality=64.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/blank-webp+segments=3.webp b/tests/python_tests/images/support/encoding-opts/blank-webp+segments=3.webp index fb77fc44b..38883bb31 100644 Binary files a/tests/python_tests/images/support/encoding-opts/blank-webp+segments=3.webp and b/tests/python_tests/images/support/encoding-opts/blank-webp+segments=3.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/blank-webp+sns_strength=50.webp b/tests/python_tests/images/support/encoding-opts/blank-webp+sns_strength=50.webp index ce65bf5df..57e0295b0 100644 Binary files a/tests/python_tests/images/support/encoding-opts/blank-webp+sns_strength=50.webp and b/tests/python_tests/images/support/encoding-opts/blank-webp+sns_strength=50.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/blank-webp+target_PSNR=.5.webp b/tests/python_tests/images/support/encoding-opts/blank-webp+target_PSNR=.5.webp index 4f7bac365..422b3a78b 100644 Binary files a/tests/python_tests/images/support/encoding-opts/blank-webp+target_PSNR=.5.webp and b/tests/python_tests/images/support/encoding-opts/blank-webp+target_PSNR=.5.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/blank-webp+target_size=100.webp b/tests/python_tests/images/support/encoding-opts/blank-webp+target_size=100.webp index 4f7bac365..422b3a78b 100644 Binary files a/tests/python_tests/images/support/encoding-opts/blank-webp+target_size=100.webp and b/tests/python_tests/images/support/encoding-opts/blank-webp+target_size=100.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/blank-webp.webp b/tests/python_tests/images/support/encoding-opts/blank-webp.webp index ce65bf5df..57e0295b0 100644 Binary files a/tests/python_tests/images/support/encoding-opts/blank-webp.webp and b/tests/python_tests/images/support/encoding-opts/blank-webp.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/solid-webp+alpha=false.webp b/tests/python_tests/images/support/encoding-opts/solid-webp+alpha=false.webp index 4d683d309..dad965457 100644 Binary files a/tests/python_tests/images/support/encoding-opts/solid-webp+alpha=false.webp and b/tests/python_tests/images/support/encoding-opts/solid-webp+alpha=false.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/solid-webp+alpha_compression=0.webp b/tests/python_tests/images/support/encoding-opts/solid-webp+alpha_compression=0.webp index 4d683d309..dad965457 100644 Binary files a/tests/python_tests/images/support/encoding-opts/solid-webp+alpha_compression=0.webp and b/tests/python_tests/images/support/encoding-opts/solid-webp+alpha_compression=0.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/solid-webp+alpha_filtering=2.webp b/tests/python_tests/images/support/encoding-opts/solid-webp+alpha_filtering=2.webp index 4d683d309..dad965457 100644 Binary files a/tests/python_tests/images/support/encoding-opts/solid-webp+alpha_filtering=2.webp and b/tests/python_tests/images/support/encoding-opts/solid-webp+alpha_filtering=2.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/solid-webp+alpha_quality=50.webp b/tests/python_tests/images/support/encoding-opts/solid-webp+alpha_quality=50.webp index 4d683d309..dad965457 100644 Binary files a/tests/python_tests/images/support/encoding-opts/solid-webp+alpha_quality=50.webp and b/tests/python_tests/images/support/encoding-opts/solid-webp+alpha_quality=50.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/solid-webp+autofilter=0.webp b/tests/python_tests/images/support/encoding-opts/solid-webp+autofilter=0.webp index 4d683d309..dad965457 100644 Binary files a/tests/python_tests/images/support/encoding-opts/solid-webp+autofilter=0.webp and b/tests/python_tests/images/support/encoding-opts/solid-webp+autofilter=0.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/solid-webp+filter_sharpness=4.webp b/tests/python_tests/images/support/encoding-opts/solid-webp+filter_sharpness=4.webp index 17980675f..42c03c180 100644 Binary files a/tests/python_tests/images/support/encoding-opts/solid-webp+filter_sharpness=4.webp and b/tests/python_tests/images/support/encoding-opts/solid-webp+filter_sharpness=4.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/solid-webp+filter_strength=50.webp b/tests/python_tests/images/support/encoding-opts/solid-webp+filter_strength=50.webp index 9365bc639..12c051b74 100644 Binary files a/tests/python_tests/images/support/encoding-opts/solid-webp+filter_strength=50.webp and b/tests/python_tests/images/support/encoding-opts/solid-webp+filter_strength=50.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/solid-webp+filter_type=1+autofilter=1.webp b/tests/python_tests/images/support/encoding-opts/solid-webp+filter_type=1+autofilter=1.webp index ccef4a3cb..f0d47bdec 100644 Binary files a/tests/python_tests/images/support/encoding-opts/solid-webp+filter_type=1+autofilter=1.webp and b/tests/python_tests/images/support/encoding-opts/solid-webp+filter_type=1+autofilter=1.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/solid-webp+method=0.webp b/tests/python_tests/images/support/encoding-opts/solid-webp+method=0.webp new file mode 100644 index 000000000..e483146ec Binary files /dev/null and b/tests/python_tests/images/support/encoding-opts/solid-webp+method=0.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/solid-webp+method=6.webp b/tests/python_tests/images/support/encoding-opts/solid-webp+method=6.webp new file mode 100644 index 000000000..8f38b7a77 Binary files /dev/null and b/tests/python_tests/images/support/encoding-opts/solid-webp+method=6.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/solid-webp+partition_limit=50.webp b/tests/python_tests/images/support/encoding-opts/solid-webp+partition_limit=50.webp index 4d683d309..dad965457 100644 Binary files a/tests/python_tests/images/support/encoding-opts/solid-webp+partition_limit=50.webp and b/tests/python_tests/images/support/encoding-opts/solid-webp+partition_limit=50.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/solid-webp+partitions=3.webp b/tests/python_tests/images/support/encoding-opts/solid-webp+partitions=3.webp index 4d683d309..dad965457 100644 Binary files a/tests/python_tests/images/support/encoding-opts/solid-webp+partitions=3.webp and b/tests/python_tests/images/support/encoding-opts/solid-webp+partitions=3.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/solid-webp+pass=10.webp b/tests/python_tests/images/support/encoding-opts/solid-webp+pass=10.webp index 4d683d309..dad965457 100644 Binary files a/tests/python_tests/images/support/encoding-opts/solid-webp+pass=10.webp and b/tests/python_tests/images/support/encoding-opts/solid-webp+pass=10.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/solid-webp+preprocessing=1.webp b/tests/python_tests/images/support/encoding-opts/solid-webp+preprocessing=1.webp index 900c47758..dad965457 100644 Binary files a/tests/python_tests/images/support/encoding-opts/solid-webp+preprocessing=1.webp and b/tests/python_tests/images/support/encoding-opts/solid-webp+preprocessing=1.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/solid-webp+quality=64.webp b/tests/python_tests/images/support/encoding-opts/solid-webp+quality=64.webp index 0378778e9..21af86e58 100644 Binary files a/tests/python_tests/images/support/encoding-opts/solid-webp+quality=64.webp and b/tests/python_tests/images/support/encoding-opts/solid-webp+quality=64.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/solid-webp+segments=3.webp b/tests/python_tests/images/support/encoding-opts/solid-webp+segments=3.webp index 79eb27a12..fa13ca386 100644 Binary files a/tests/python_tests/images/support/encoding-opts/solid-webp+segments=3.webp and b/tests/python_tests/images/support/encoding-opts/solid-webp+segments=3.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/solid-webp+sns_strength=50.webp b/tests/python_tests/images/support/encoding-opts/solid-webp+sns_strength=50.webp index 4d683d309..dad965457 100644 Binary files a/tests/python_tests/images/support/encoding-opts/solid-webp+sns_strength=50.webp and b/tests/python_tests/images/support/encoding-opts/solid-webp+sns_strength=50.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/solid-webp+target_PSNR=.5.webp b/tests/python_tests/images/support/encoding-opts/solid-webp+target_PSNR=.5.webp index 9f4750b4a..6b55ec46f 100644 Binary files a/tests/python_tests/images/support/encoding-opts/solid-webp+target_PSNR=.5.webp and b/tests/python_tests/images/support/encoding-opts/solid-webp+target_PSNR=.5.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/solid-webp+target_size=100.webp b/tests/python_tests/images/support/encoding-opts/solid-webp+target_size=100.webp index 9f4750b4a..6b55ec46f 100644 Binary files a/tests/python_tests/images/support/encoding-opts/solid-webp+target_size=100.webp and b/tests/python_tests/images/support/encoding-opts/solid-webp+target_size=100.webp differ diff --git a/tests/python_tests/images/support/encoding-opts/solid-webp.webp b/tests/python_tests/images/support/encoding-opts/solid-webp.webp index 4d683d309..dad965457 100644 Binary files a/tests/python_tests/images/support/encoding-opts/solid-webp.webp and b/tests/python_tests/images/support/encoding-opts/solid-webp.webp differ diff --git a/tests/python_tests/images/support/transparency/white0.webp b/tests/python_tests/images/support/transparency/white0.webp index 81c926c23..a37062675 100644 Binary files a/tests/python_tests/images/support/transparency/white0.webp and b/tests/python_tests/images/support/transparency/white0.webp differ diff --git a/tests/python_tests/webp_encoding_test.py b/tests/python_tests/webp_encoding_test.py index c512b1a71..933bb238c 100644 --- a/tests/python_tests/webp_encoding_test.py +++ b/tests/python_tests/webp_encoding_test.py @@ -19,6 +19,8 @@ if mapnik.has_webp(): opts = [ 'webp', + 'webp:method=0', + 'webp:method=6', 'webp:quality=64', 'webp:alpha=false', 'webp:partitions=3', @@ -113,6 +115,7 @@ if mapnik.has_webp(): continue if mapnik.Image.open(actual).tostring() != expected_bytes: fails.append('%s (actual) not == to %s (expected)' % (actual,expected)) + # disabled to avoid failures on ubuntu when using old webp packages #eq_(fails,[],'\n'+'\n'.join(fails)) def test_transparency_levels(): @@ -128,7 +131,7 @@ if mapnik.has_webp(): for x in range(im.width()/2,im.width()): im.set_pixel(x,y,c3) - t0 = tmp_dir + 'white0.webp' + t0 = tmp_dir + 'white0-actual.webp' # octree format = 'webp' @@ -144,6 +147,7 @@ if mapnik.has_webp(): # this will happen if libweb is old, since it cannot open images created by more recent webp print 'warning, cannot open webp expected image (your libwebp is likely too old)' return + # disabled to avoid failures on ubuntu when using old webp packages #eq_(t0_len,len(expected_bytes))