diff --git a/CMakeLists.txt b/CMakeLists.txt index f9365e2..0bcabf7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.2) project(identiconpp - VERSION 0.3.0 + VERSION 0.3.1 LANGUAGES CXX ) diff --git a/example.cpp b/example.cpp index 9d9892c..484df5f 100644 --- a/example.cpp +++ b/example.cpp @@ -47,6 +47,8 @@ int main(int argc, char *argv[]) }); img = identicon.generate(digest, 500); img.write("identicon_example_ltr_asymmetric.png"); + img.magick("GIF"); + img.write("identicon_example_ltr_asymmetric.gif"); } { @@ -62,6 +64,7 @@ int main(int argc, char *argv[]) }); img = identicon.generate(digest, 500); img.write("identicon_example_sigil.png"); + img.write("identicon_example_sigil.jpg"); } return 0; diff --git a/src/identiconpp.cpp b/src/identiconpp.cpp index 7a6f1a4..2e2b426 100644 --- a/src/identiconpp.cpp +++ b/src/identiconpp.cpp @@ -74,7 +74,6 @@ Magick::Image Identiconpp::generate(const string &digest, const uint16_t width) img.scale(Magick::Geometry(imgwidth, imgheight)); img.borderColor(Magick::Color('#' + _background)); img.border(Magick::Geometry(_padding[0], _padding[1])); - img.magick("png"); return img; } diff --git a/src/identiconpp.hpp b/src/identiconpp.hpp index 7b73f2c..cabdcc6 100644 --- a/src/identiconpp.hpp +++ b/src/identiconpp.hpp @@ -71,7 +71,7 @@ public: * @param digest The pre-computed digest * @param width The width of the image in pixels * - * @return The image + * @return The image as Magick::Image */ Magick::Image generate(const string &digest, const uint16_t width = 100);