Removed png as default mode.
the build was successful Details

Image format is now selected by file extension or magick().
This commit is contained in:
tastytea 2018-12-27 06:49:37 +01:00
parent 9c60212ca8
commit 42e7fd9a18
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
4 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.2)
project(identiconpp
VERSION 0.3.0
VERSION 0.3.1
LANGUAGES CXX
)

View File

@ -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;

View File

@ -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;
}

View File

@ -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);