diff --git a/src/image_util.cpp b/src/image_util.cpp index 291ae5beb..dc1fbbebe 100644 --- a/src/image_util.cpp +++ b/src/image_util.cpp @@ -86,6 +86,15 @@ std::string save_to_string(T const& image, return ss.str(); } +template +std::string save_to_string(T const& image, + std::string const& type) +{ + std::ostringstream ss(std::ios::out|std::ios::binary); + save_to_stream(image, ss, type); + return ss.str(); +} + template void save_to_file(T const& image, std::string const& filename, @@ -428,6 +437,9 @@ template void save_to_file(image_data_32 const&, std::string const&, rgba_palette const& palette); +template std::string save_to_string(image_data_32 const&, + std::string const&); + template std::string save_to_string(image_data_32 const&, std::string const&, rgba_palette const& palette); @@ -448,6 +460,9 @@ template void save_to_file > (image_view > (image_view const&, + std::string const&); + template std::string save_to_string > (image_view const&, std::string const&, rgba_palette const& palette);