From 881dba4fc9a803db27889cc2812765b17a6dce25 Mon Sep 17 00:00:00 2001 From: artemp Date: Thu, 14 May 2015 12:53:21 +0100 Subject: [PATCH] fix camel case --- include/mapnik/image_util.hpp | 6 ++-- include/mapnik/tiff_io.hpp | 10 +++--- src/cairo_io.cpp | 6 ++-- src/image_util.cpp | 44 +++++++++++++------------- src/image_util_jpeg.cpp | 10 +++--- src/image_util_png.cpp | 42 ++++++++++++------------- src/image_util_tiff.cpp | 22 ++++++------- src/image_util_webp.cpp | 58 +++++++++++++++++------------------ 8 files changed, 99 insertions(+), 99 deletions(-) diff --git a/include/mapnik/image_util.hpp b/include/mapnik/image_util.hpp index 9cabef117..e980852a9 100644 --- a/include/mapnik/image_util.hpp +++ b/include/mapnik/image_util.hpp @@ -53,15 +53,15 @@ struct image_view_any; template class image_view; class color; -class ImageWriterException : public std::exception +class image_writer_exception : public std::exception { private: std::string message_; public: - ImageWriterException(std::string const& message) + image_writer_exception(std::string const& message) : message_(message) {} - ~ImageWriterException() throw() {} + ~image_writer_exception() throw() {} virtual const char* what() const throw() { diff --git a/include/mapnik/tiff_io.hpp b/include/mapnik/tiff_io.hpp index c08304c9b..fd3a7534b 100644 --- a/include/mapnik/tiff_io.hpp +++ b/include/mapnik/tiff_io.hpp @@ -190,7 +190,7 @@ struct tag_setter void operator() (T const&) const { // Assume this would be null type - throw ImageWriterException("Could not write TIFF - unknown image type provided"); + throw image_writer_exception("Could not write TIFF - unknown image type provided"); } inline void operator() (image_rgba8 const& data) const @@ -358,7 +358,7 @@ struct tag_setter inline void operator() (image_null const&) const { // Assume this would be null type - throw ImageWriterException("Could not write TIFF - Null image provided"); + throw image_writer_exception("Could not write TIFF - Null image provided"); } private: @@ -406,7 +406,7 @@ void save_as_tiff(T1 & file, T2 const& image, tiff_config const& config) tiff_dummy_unmap_proc); if (! output) { - throw ImageWriterException("Could not write TIFF"); + throw image_writer_exception("Could not write TIFF"); } TIFFSetField(output, TIFFTAG_IMAGEWIDTH, width); @@ -453,7 +453,7 @@ void save_as_tiff(T1 & file, T2 const& image, tiff_config const& config) } if (TIFFWriteEncodedStrip(output, TIFFComputeStrip(output, y, 0), strip_buffer.get(), strip_size * sizeof(pixel_type)) == -1) { - throw ImageWriterException("Could not write TIFF - TIFF Tile Write failed"); + throw image_writer_exception("Could not write TIFF - TIFF Tile Write failed"); } } } @@ -504,7 +504,7 @@ void save_as_tiff(T1 & file, T2 const& image, tiff_config const& config) } if (TIFFWriteEncodedTile(output, TIFFComputeTile(output, x, y, 0, 0), image_out.get(), tile_size * sizeof(pixel_type)) == -1) { - throw ImageWriterException("Could not write TIFF - TIFF Tile Write failed"); + throw image_writer_exception("Could not write TIFF - TIFF Tile Write failed"); } } } diff --git a/src/cairo_io.cpp b/src/cairo_io.cpp index 0eefa2e89..d8e965584 100644 --- a/src/cairo_io.cpp +++ b/src/cairo_io.cpp @@ -55,7 +55,7 @@ void save_to_cairo_file(mapnik::Map const& map, std::string const& filename, dou { save_to_cairo_file(map,filename,*type,scale_factor,scale_denominator); } - else throw ImageWriterException("Could not write file to " + filename ); + else throw image_writer_exception("Could not write file to " + filename ); } void save_to_cairo_file(mapnik::Map const& map, @@ -75,7 +75,7 @@ void save_to_cairo_file(mapnik::Map const& map, #ifdef CAIRO_HAS_PDF_SURFACE surface = cairo_surface_ptr(cairo_pdf_surface_create(filename.c_str(),width,height),cairo_surface_closer()); #else - throw ImageWriterException("PDFSurface not supported in the cairo backend"); + throw image_writer_exception("PDFSurface not supported in the cairo backend"); #endif } #ifdef CAIRO_HAS_SVG_SURFACE @@ -102,7 +102,7 @@ void save_to_cairo_file(mapnik::Map const& map, #endif else { - throw ImageWriterException("unknown file type: " + type); + throw image_writer_exception("unknown file type: " + type); } //cairo_t * ctx = cairo_create(surface); diff --git a/src/image_util.cpp b/src/image_util.cpp index 0f29ec6df..ba4a38025 100644 --- a/src/image_util.cpp +++ b/src/image_util.cpp @@ -91,7 +91,7 @@ MAPNIK_DECL void save_to_file(T const& image, { save_to_stream(image, file, type, palette); } - else throw ImageWriterException("Could not write file to " + filename ); + else throw image_writer_exception("Could not write file to " + filename ); } template @@ -104,7 +104,7 @@ MAPNIK_DECL void save_to_file(T const& image, { save_to_stream(image, file, type); } - else throw ImageWriterException("Could not write file to " + filename ); + else throw image_writer_exception("Could not write file to " + filename ); } template @@ -124,15 +124,15 @@ MAPNIK_DECL void save_to_stream(T const& image, } else if (boost::algorithm::starts_with(t, "tif")) { - throw ImageWriterException("palettes are not currently supported when writing to tiff format (yet)"); + throw image_writer_exception("palettes are not currently supported when writing to tiff format (yet)"); } else if (boost::algorithm::starts_with(t, "jpeg")) { - throw ImageWriterException("palettes are not currently supported when writing to jpeg format"); + throw image_writer_exception("palettes are not currently supported when writing to jpeg format"); } - else throw ImageWriterException("unknown file type: " + type); + else throw image_writer_exception("unknown file type: " + type); } - else throw ImageWriterException("Could not write to empty stream" ); + else throw image_writer_exception("Could not write to empty stream" ); } // This can be removed once image_any and image_view_any are the only @@ -155,15 +155,15 @@ MAPNIK_DECL void save_to_stream(image_rgba8 const& image, } else if (boost::algorithm::starts_with(t, "tif")) { - throw ImageWriterException("palettes are not currently supported when writing to tiff format (yet)"); + throw image_writer_exception("palettes are not currently supported when writing to tiff format (yet)"); } else if (boost::algorithm::starts_with(t, "jpeg")) { - throw ImageWriterException("palettes are not currently supported when writing to jpeg format"); + throw image_writer_exception("palettes are not currently supported when writing to jpeg format"); } - else throw ImageWriterException("unknown file type: " + type); + else throw image_writer_exception("unknown file type: " + type); } - else throw ImageWriterException("Could not write to empty stream" ); + else throw image_writer_exception("Could not write to empty stream" ); } // This can be removed once image_any and image_view_any are the only @@ -186,15 +186,15 @@ MAPNIK_DECL void save_to_stream(image_view_rgba8 const& image, } else if (boost::algorithm::starts_with(t, "tif")) { - throw ImageWriterException("palettes are not currently supported when writing to tiff format (yet)"); + throw image_writer_exception("palettes are not currently supported when writing to tiff format (yet)"); } else if (boost::algorithm::starts_with(t, "jpeg")) { - throw ImageWriterException("palettes are not currently supported when writing to jpeg format"); + throw image_writer_exception("palettes are not currently supported when writing to jpeg format"); } - else throw ImageWriterException("unknown file type: " + type); + else throw image_writer_exception("unknown file type: " + type); } - else throw ImageWriterException("Could not write to empty stream" ); + else throw image_writer_exception("Could not write to empty stream" ); } template @@ -226,9 +226,9 @@ MAPNIK_DECL void save_to_stream(T const& image, webp_saver visitor(stream, t); util::apply_visitor(visitor, image); } - else throw ImageWriterException("unknown file type: " + type); + else throw image_writer_exception("unknown file type: " + type); } - else throw ImageWriterException("Could not write to empty stream" ); + else throw image_writer_exception("Could not write to empty stream" ); } // This can be removed once image_any and image_view_any are the only @@ -266,9 +266,9 @@ MAPNIK_DECL void save_to_stream(image_rgba8 const& image, visitor(image); //util::apply_visitor(visitor, image); } - else throw ImageWriterException("unknown file type: " + type); + else throw image_writer_exception("unknown file type: " + type); } - else throw ImageWriterException("Could not write to empty stream" ); + else throw image_writer_exception("Could not write to empty stream" ); } // This can be removed once image_any and image_view_any are the only @@ -306,9 +306,9 @@ MAPNIK_DECL void save_to_stream(image_view_rgba8 const& image, visitor(image); //util::apply_visitor(visitor, image); } - else throw ImageWriterException("unknown file type: " + type); + else throw image_writer_exception("unknown file type: " + type); } - else throw ImageWriterException("Could not write to empty stream" ); + else throw image_writer_exception("Could not write to empty stream" ); } template @@ -319,7 +319,7 @@ MAPNIK_DECL void save_to_file(T const& image, std::string const& filename) { save_to_file(image, filename, *type); } - else throw ImageWriterException("Could not write file to " + filename ); + else throw image_writer_exception("Could not write file to " + filename ); } template @@ -330,7 +330,7 @@ MAPNIK_DECL void save_to_file(T const& image, std::string const& filename, rgba_ { save_to_file(image, filename, *type, palette); } - else throw ImageWriterException("Could not write file to " + filename ); + else throw image_writer_exception("Could not write file to " + filename ); } // image_rgba8 diff --git a/src/image_util_jpeg.cpp b/src/image_util_jpeg.cpp index e85971de9..f6616057b 100644 --- a/src/image_util_jpeg.cpp +++ b/src/image_util_jpeg.cpp @@ -66,7 +66,7 @@ void process_rgba8_jpeg(T const& image, std::string const& type, std::ostream & { if (!mapnik::util::string2int(val,quality) || quality < 0 || quality > 100) { - throw ImageWriterException("invalid jpeg quality: '" + val + "'"); + throw image_writer_exception("invalid jpeg quality: '" + val + "'"); } } } @@ -74,7 +74,7 @@ void process_rgba8_jpeg(T const& image, std::string const& type, std::ostream & } save_as_jpeg(stream, quality, image); #else - throw ImageWriterException("jpeg output is not enabled in your build of Mapnik"); + throw image_writer_exception("jpeg output is not enabled in your build of Mapnik"); #endif } @@ -93,19 +93,19 @@ void jpeg_saver::operator() (image_view_rgba8 const& image) co template<> void jpeg_saver::operator() (image_null const& image) const { - throw ImageWriterException("Can not save a null image to jpeg"); + throw image_writer_exception("Can not save a null image to jpeg"); } template<> void jpeg_saver::operator() (image_view_null const& image) const { - throw ImageWriterException("Can not save a null image to jpeg"); + throw image_writer_exception("Can not save a null image to jpeg"); } template void jpeg_saver::operator() (T const& image) const { - throw ImageWriterException("Mapnik does not support jpeg grayscale images"); + throw image_writer_exception("Mapnik does not support jpeg grayscale images"); } template void jpeg_saver::operator() (image_rgba8 const& image) const; diff --git a/src/image_util_png.cpp b/src/image_util_png.cpp index 5b2ccc7f2..1cd359c0f 100644 --- a/src/image_util_png.cpp +++ b/src/image_util_png.cpp @@ -95,14 +95,14 @@ void handle_png_options(std::string const& type, set_colors = true; if (!mapnik::util::string2int(t.substr(2),opts.colors) || opts.colors < 1 || opts.colors > 256) { - throw ImageWriterException("invalid color parameter: " + t.substr(2)); + throw image_writer_exception("invalid color parameter: " + t.substr(2)); } } else if (boost::algorithm::starts_with(t, "t=")) { if (!mapnik::util::string2int(t.substr(2),opts.trans_mode) || opts.trans_mode < 0 || opts.trans_mode > 2) { - throw ImageWriterException("invalid trans_mode parameter: " + t.substr(2)); + throw image_writer_exception("invalid trans_mode parameter: " + t.substr(2)); } } else if (boost::algorithm::starts_with(t, "g=")) @@ -110,7 +110,7 @@ void handle_png_options(std::string const& type, set_gamma = true; if (!mapnik::util::string2double(t.substr(2),opts.gamma) || opts.gamma < 0) { - throw ImageWriterException("invalid gamma parameter: " + t.substr(2)); + throw image_writer_exception("invalid gamma parameter: " + t.substr(2)); } } else if (boost::algorithm::starts_with(t, "z=")) @@ -125,7 +125,7 @@ void handle_png_options(std::string const& type, || opts.compression < Z_DEFAULT_COMPRESSION || opts.compression > 10) // use 10 here rather than Z_BEST_COMPRESSION (9) to allow for MZ_UBER_COMPRESSION { - throw ImageWriterException("invalid compression parameter: " + t.substr(2) + " (only -1 through 10 are valid)"); + throw image_writer_exception("invalid compression parameter: " + t.substr(2) + " (only -1 through 10 are valid)"); } } else if (boost::algorithm::starts_with(t, "s=")) @@ -153,26 +153,26 @@ void handle_png_options(std::string const& type, } else { - throw ImageWriterException("invalid compression strategy parameter: " + s); + throw image_writer_exception("invalid compression strategy parameter: " + s); } } else { - throw ImageWriterException("unhandled png option: " + t); + throw image_writer_exception("unhandled png option: " + t); } } // validation if (!opts.paletted && set_colors) { - throw ImageWriterException("invalid color parameter: unavailable for true color (non-paletted) images"); + throw image_writer_exception("invalid color parameter: unavailable for true color (non-paletted) images"); } if (!opts.paletted && set_gamma) { - throw ImageWriterException("invalid gamma parameter: unavailable for true color (non-paletted) images"); + throw image_writer_exception("invalid gamma parameter: unavailable for true color (non-paletted) images"); } if ((opts.use_miniz == false) && opts.compression > Z_BEST_COMPRESSION) { - throw ImageWriterException("invalid compression value: (only -1 through 9 are valid)"); + throw image_writer_exception("invalid compression value: (only -1 through 9 are valid)"); } } #endif @@ -186,29 +186,29 @@ png_saver_pal::png_saver_pal(std::ostream & stream, std::string const& t, rgba_p template<> void png_saver::operator() (image_null const& image) const { - throw ImageWriterException("null images not supported for png"); + throw image_writer_exception("null images not supported for png"); } template<> void png_saver_pal::operator() (image_null const& image) const { - throw ImageWriterException("null images not supported for png"); + throw image_writer_exception("null images not supported for png"); } template<> void png_saver::operator() (image_view_null const& image) const { - throw ImageWriterException("null image views not supported for png"); + throw image_writer_exception("null image views not supported for png"); } template<> void png_saver_pal::operator() (image_view_null const& image) const { - throw ImageWriterException("null image views not supported for png"); + throw image_writer_exception("null image views not supported for png"); } template -void process_rgba8_png_pal(T const& image, +void process_rgba8_png_pal(T const& image, std::string const& t, std::ostream & stream, rgba_palette const& pal) @@ -238,12 +238,12 @@ void process_rgba8_png_pal(T const& image, save_as_png(stream, image, opts); } #else - throw ImageWriterException("png output is not enabled in your build of Mapnik"); + throw image_writer_exception("png output is not enabled in your build of Mapnik"); #endif } template -void process_rgba8_png(T const& image, +void process_rgba8_png(T const& image, std::string const& t, std::ostream & stream) { @@ -266,7 +266,7 @@ void process_rgba8_png(T const& image, save_as_png(stream, image, opts); } #else - throw ImageWriterException("png output is not enabled in your build of Mapnik"); + throw image_writer_exception("png output is not enabled in your build of Mapnik"); #endif } @@ -298,12 +298,12 @@ template void png_saver::operator() (T const& image) const { #if defined(HAVE_PNG) - throw ImageWriterException("Mapnik does not support grayscale images for png"); + throw image_writer_exception("Mapnik does not support grayscale images for png"); //png_options opts; //handle_png_options(t_, opts); //save_as_png(stream_, image, opts); #else - throw ImageWriterException("png output is not enabled in your build of Mapnik"); + throw image_writer_exception("png output is not enabled in your build of Mapnik"); #endif } @@ -311,12 +311,12 @@ template void png_saver_pal::operator() (T const& image) const { #if defined(HAVE_PNG) - throw ImageWriterException("Mapnik does not support grayscale images for png"); + throw image_writer_exception("Mapnik does not support grayscale images for png"); //png_options opts; //handle_png_options(t_, opts); //save_as_png(stream_, image, opts); #else - throw ImageWriterException("png output is not enabled in your build of Mapnik"); + throw image_writer_exception("png output is not enabled in your build of Mapnik"); #endif } diff --git a/src/image_util_tiff.cpp b/src/image_util_tiff.cpp index fb611ca58..e3029a257 100644 --- a/src/image_util_tiff.cpp +++ b/src/image_util_tiff.cpp @@ -76,12 +76,12 @@ void handle_tiff_options(std::string const& type, config.compression = COMPRESSION_LZW; } else if (val == "none") - { + { config.compression = COMPRESSION_NONE; } else { - throw ImageWriterException("invalid tiff compression: '" + val + "'"); + throw image_writer_exception("invalid tiff compression: '" + val + "'"); } } } @@ -104,7 +104,7 @@ void handle_tiff_options(std::string const& type, } else { - throw ImageWriterException("invalid tiff method: '" + val + "'"); + throw image_writer_exception("invalid tiff method: '" + val + "'"); } } } @@ -115,7 +115,7 @@ void handle_tiff_options(std::string const& type, { if (!mapnik::util::string2int(val,config.zlevel) || config.zlevel < 0 || config.zlevel > 9) { - throw ImageWriterException("invalid tiff zlevel: '" + val + "'"); + throw image_writer_exception("invalid tiff zlevel: '" + val + "'"); } } } @@ -126,7 +126,7 @@ void handle_tiff_options(std::string const& type, { if (!mapnik::util::string2int(val,config.tile_height) || config.tile_height < 0 ) { - throw ImageWriterException("invalid tiff tile_height: '" + val + "'"); + throw image_writer_exception("invalid tiff tile_height: '" + val + "'"); } } } @@ -137,7 +137,7 @@ void handle_tiff_options(std::string const& type, { if (!mapnik::util::string2int(val,config.tile_width) || config.tile_width < 0 ) { - throw ImageWriterException("invalid tiff tile_width: '" + val + "'"); + throw image_writer_exception("invalid tiff tile_width: '" + val + "'"); } } } @@ -148,13 +148,13 @@ void handle_tiff_options(std::string const& type, { if (!mapnik::util::string2int(val,config.rows_per_strip) || config.rows_per_strip < 0 ) { - throw ImageWriterException("invalid tiff rows_per_strip: '" + val + "'"); + throw image_writer_exception("invalid tiff rows_per_strip: '" + val + "'"); } } } else { - throw ImageWriterException("unhandled tiff option: " + t); + throw image_writer_exception("unhandled tiff option: " + t); } } } @@ -167,13 +167,13 @@ tiff_saver::tiff_saver(std::ostream & stream, std::string const& t): template<> void tiff_saver::operator() (image_null const& image) const { - throw ImageWriterException("null images not supported"); + throw image_writer_exception("null images not supported"); } template<> void tiff_saver::operator() (image_view_null const& image) const { - throw ImageWriterException("null image views not supported"); + throw image_writer_exception("null image views not supported"); } template @@ -184,7 +184,7 @@ void tiff_saver::operator() (T const& image) const handle_tiff_options(t_, opts); save_as_tiff(stream_, image, opts); #else - throw ImageWriterException("tiff output is not enabled in your build of Mapnik"); + throw image_writer_exception("tiff output is not enabled in your build of Mapnik"); #endif } diff --git a/src/image_util_webp.cpp b/src/image_util_webp.cpp index eb1075a45..8228c857c 100644 --- a/src/image_util_webp.cpp +++ b/src/image_util_webp.cpp @@ -68,7 +68,7 @@ void handle_webp_options(std::string const& type, double quality = 90; if (!mapnik::util::string2double(val,quality) || quality < 0.0 || quality > 100.0) { - throw ImageWriterException("invalid webp quality: '" + val + "'"); + throw image_writer_exception("invalid webp quality: '" + val + "'"); } config.quality = static_cast(quality); } @@ -80,7 +80,7 @@ void handle_webp_options(std::string const& type, { if (!mapnik::util::string2int(val,config.method) || config.method < 0 || config.method > 6) { - throw ImageWriterException("invalid webp method: '" + val + "'"); + throw image_writer_exception("invalid webp method: '" + val + "'"); } } } @@ -92,7 +92,7 @@ void handle_webp_options(std::string const& type, #if (WEBP_ENCODER_ABI_VERSION >> 8) >= 1 // >= v0.1.99 / 0x0100 if (!mapnik::util::string2int(val,config.lossless) || config.lossless < 0 || config.lossless > 1) { - throw ImageWriterException("invalid webp lossless: '" + val + "'"); + throw image_writer_exception("invalid webp lossless: '" + val + "'"); } #else #ifdef _MSC_VER @@ -100,7 +100,7 @@ void handle_webp_options(std::string const& type, #else #warning "compiling against webp that does not support the lossless flag" #endif - throw ImageWriterException("your webp version does not support the lossless option"); + throw image_writer_exception("your webp version does not support the lossless option"); #endif } } @@ -113,7 +113,7 @@ void handle_webp_options(std::string const& type, int image_hint = 0; if (!mapnik::util::string2int(val,image_hint) || image_hint < 0 || image_hint > 3) { - throw ImageWriterException("invalid webp image_hint: '" + val + "'"); + throw image_writer_exception("invalid webp image_hint: '" + val + "'"); } config.image_hint = static_cast(image_hint); #else @@ -122,7 +122,7 @@ void handle_webp_options(std::string const& type, #else #warning "compiling against webp that does not support the image_hint flag" #endif - throw ImageWriterException("your webp version does not support the image_hint option"); + throw image_writer_exception("your webp version does not support the image_hint option"); #endif } } @@ -133,7 +133,7 @@ void handle_webp_options(std::string const& type, { if (!mapnik::util::string2bool(val,alpha)) { - throw ImageWriterException("invalid webp alpha: '" + val + "'"); + throw image_writer_exception("invalid webp alpha: '" + val + "'"); } } } @@ -144,7 +144,7 @@ void handle_webp_options(std::string const& type, { if (!mapnik::util::string2int(val,config.target_size)) { - throw ImageWriterException("invalid webp target_size: '" + val + "'"); + throw image_writer_exception("invalid webp target_size: '" + val + "'"); } } } @@ -156,7 +156,7 @@ void handle_webp_options(std::string const& type, double psnr = 0; if (!mapnik::util::string2double(val,psnr)) { - throw ImageWriterException("invalid webp target_psnr: '" + val + "'"); + throw image_writer_exception("invalid webp target_psnr: '" + val + "'"); } config.target_PSNR = psnr; } @@ -168,7 +168,7 @@ void handle_webp_options(std::string const& type, { if (!mapnik::util::string2int(val,config.segments)) { - throw ImageWriterException("invalid webp segments: '" + val + "'"); + throw image_writer_exception("invalid webp segments: '" + val + "'"); } } } @@ -179,7 +179,7 @@ void handle_webp_options(std::string const& type, { if (!mapnik::util::string2int(val,config.sns_strength)) { - throw ImageWriterException("invalid webp sns_strength: '" + val + "'"); + throw image_writer_exception("invalid webp sns_strength: '" + val + "'"); } } } @@ -190,7 +190,7 @@ void handle_webp_options(std::string const& type, { if (!mapnik::util::string2int(val,config.filter_strength)) { - throw ImageWriterException("invalid webp filter_strength: '" + val + "'"); + throw image_writer_exception("invalid webp filter_strength: '" + val + "'"); } } } @@ -201,7 +201,7 @@ void handle_webp_options(std::string const& type, { if (!mapnik::util::string2int(val,config.filter_sharpness)) { - throw ImageWriterException("invalid webp filter_sharpness: '" + val + "'"); + throw image_writer_exception("invalid webp filter_sharpness: '" + val + "'"); } } } @@ -212,7 +212,7 @@ void handle_webp_options(std::string const& type, { if (!mapnik::util::string2int(val,config.filter_type)) { - throw ImageWriterException("invalid webp filter_type: '" + val + "'"); + throw image_writer_exception("invalid webp filter_type: '" + val + "'"); } } } @@ -223,7 +223,7 @@ void handle_webp_options(std::string const& type, { if (!mapnik::util::string2int(val,config.autofilter)) { - throw ImageWriterException("invalid webp autofilter: '" + val + "'"); + throw image_writer_exception("invalid webp autofilter: '" + val + "'"); } } } @@ -234,7 +234,7 @@ void handle_webp_options(std::string const& type, { if (!mapnik::util::string2int(val,config.alpha_compression)) { - throw ImageWriterException("invalid webp alpha_compression: '" + val + "'"); + throw image_writer_exception("invalid webp alpha_compression: '" + val + "'"); } } } @@ -246,7 +246,7 @@ void handle_webp_options(std::string const& type, #if (WEBP_ENCODER_ABI_VERSION >> 8) >= 1 // >= v0.1.99 / 0x0100 if (!mapnik::util::string2int(val,config.alpha_filtering)) { - throw ImageWriterException("invalid webp alpha_filtering: '" + val + "'"); + throw image_writer_exception("invalid webp alpha_filtering: '" + val + "'"); } #else #ifdef _MSC_VER @@ -254,7 +254,7 @@ void handle_webp_options(std::string const& type, #else #warning "compiling against webp that does not support the alpha_filtering flag" #endif - throw ImageWriterException("your webp version does not support the alpha_filtering option"); + throw image_writer_exception("your webp version does not support the alpha_filtering option"); #endif } } @@ -266,7 +266,7 @@ void handle_webp_options(std::string const& type, #if (WEBP_ENCODER_ABI_VERSION >> 8) >= 1 // >= v0.1.99 / 0x0100 if (!mapnik::util::string2int(val,config.alpha_quality)) { - throw ImageWriterException("invalid webp alpha_quality: '" + val + "'"); + throw image_writer_exception("invalid webp alpha_quality: '" + val + "'"); } #else #ifdef _MSC_VER @@ -274,7 +274,7 @@ void handle_webp_options(std::string const& type, #else #warning "compiling against webp that does not support the alpha_quality flag" #endif - throw ImageWriterException("your webp version does not support the alpha_quality option"); + throw image_writer_exception("your webp version does not support the alpha_quality option"); #endif } } @@ -285,7 +285,7 @@ void handle_webp_options(std::string const& type, { if (!mapnik::util::string2int(val,config.pass)) { - throw ImageWriterException("invalid webp pass: '" + val + "'"); + throw image_writer_exception("invalid webp pass: '" + val + "'"); } } } @@ -296,7 +296,7 @@ void handle_webp_options(std::string const& type, { if (!mapnik::util::string2int(val,config.preprocessing)) { - throw ImageWriterException("invalid webp preprocessing: '" + val + "'"); + throw image_writer_exception("invalid webp preprocessing: '" + val + "'"); } } } @@ -307,7 +307,7 @@ void handle_webp_options(std::string const& type, { if (!mapnik::util::string2int(val,config.partitions)) { - throw ImageWriterException("invalid webp partitions: '" + val + "'"); + throw image_writer_exception("invalid webp partitions: '" + val + "'"); } } } @@ -318,13 +318,13 @@ void handle_webp_options(std::string const& type, { if (!mapnik::util::string2int(val,config.partition_limit)) { - throw ImageWriterException("invalid webp partition_limit: '" + val + "'"); + throw image_writer_exception("invalid webp partition_limit: '" + val + "'"); } } } else { - throw ImageWriterException("unhandled webp option: " + t); + throw image_writer_exception("unhandled webp option: " + t); } } } @@ -337,13 +337,13 @@ webp_saver::webp_saver(std::ostream & stream, std::string const& t): template<> void webp_saver::operator() (image_null const& image) const { - throw ImageWriterException("null images not supported"); + throw image_writer_exception("null images not supported"); } template<> void webp_saver::operator() (image_view_null const& image) const { - throw ImageWriterException("null image views not supported"); + throw image_writer_exception("null image views not supported"); } template @@ -361,7 +361,7 @@ void process_rgba8_webp(T const& image, std::string const& t, std::ostream & str handle_webp_options(t,config,alpha); save_as_webp(stream,image,config,alpha); #else - throw ImageWriterException("webp output is not enabled in your build of Mapnik"); + throw image_writer_exception("webp output is not enabled in your build of Mapnik"); #endif } @@ -380,7 +380,7 @@ void webp_saver::operator() (image_view_rgba8 const& image) co template void webp_saver::operator() (T const& image) const { - throw ImageWriterException("Mapnik does not support webp grayscale images"); + throw image_writer_exception("Mapnik does not support webp grayscale images"); } template void webp_saver::operator() (image_rgba8 const& image) const;