From 4fce3a7451c1caea0935bdf1f7cd9226375016da Mon Sep 17 00:00:00 2001 From: Blake Thompson Date: Fri, 15 May 2015 15:25:52 -0500 Subject: [PATCH] Updates to fix failing image options --- src/image_options.cpp | 4 ++-- src/image_util_jpeg.cpp | 2 ++ src/image_util_tiff.cpp | 2 +- src/image_util_webp.cpp | 2 ++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/image_options.cpp b/src/image_options.cpp index cde7b4fdc..363130ae0 100644 --- a/src/image_options.cpp +++ b/src/image_options.cpp @@ -42,9 +42,9 @@ struct image_options_grammar ; pair = key >> -('=' >> value) ; - key = char_("a-zA-Z_") >> *char_("a-zA-Z_0-9") + key = char_("a-zA-Z_") >> *char_("a-zA-Z_0-9\\.") ; - value = +char_("a-zA-Z_0-9") + value = +char_("a-zA-Z_0-9\\.") ; } diff --git a/src/image_util_jpeg.cpp b/src/image_util_jpeg.cpp index b9e2df8c9..1c00c8467 100644 --- a/src/image_util_jpeg.cpp +++ b/src/image_util_jpeg.cpp @@ -52,6 +52,8 @@ void process_rgba8_jpeg(T const& image, std::string const& type, std::ostream & { auto const& key = kv.first; auto const& val = kv.second; + + if ( key == "jpeg" ) continue; if ( key == "quality") { diff --git a/src/image_util_tiff.cpp b/src/image_util_tiff.cpp index c7d888d5e..5c1e48684 100644 --- a/src/image_util_tiff.cpp +++ b/src/image_util_tiff.cpp @@ -53,7 +53,7 @@ void handle_tiff_options(std::string const& type, { auto const& key = kv.first; auto const& val = kv.second; - + if (key == "tiff") continue; if (key == "compression") { if (val && !(*val).empty()) diff --git a/src/image_util_webp.cpp b/src/image_util_webp.cpp index 42d16be8c..c21a637ea 100644 --- a/src/image_util_webp.cpp +++ b/src/image_util_webp.cpp @@ -55,6 +55,8 @@ void handle_webp_options(std::string const& type, { auto const& key = kv.first; auto const& val = kv.second; + + if (key == "webp") continue; if (key == "quality") {