Throw error if libravatar-style is selected (not implemented).
the build was successful Details

This commit is contained in:
tastytea 2018-12-26 18:32:37 +01:00
parent ca4ed6f2ab
commit 302b8adb8b
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
3 changed files with 16 additions and 15 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.2)
project(identiconpp
VERSION 0.1.1
VERSION 0.1.2
LANGUAGES CXX
)

View File

@ -34,20 +34,20 @@ int main(int argc, char *argv[])
img.write("identicon_example_simple.png");
}
{
Identiconpp identicon(10, 10, Identiconpp::identicon_type::libravatar,
"ffffffff",
{
"000000ff",
"ff0000ff",
"ffff00ff",
"00ff00ff",
"00ffffff",
"0000ffff"
});
img = identicon.generate(digest, 500);
img.write("identicon_example_libravatar.png");
}
// {
// Identiconpp identicon(10, 10, Identiconpp::identicon_type::libravatar,
// "ffffffff",
// {
// "000000ff",
// "ff0000ff",
// "ffff00ff",
// "00ff00ff",
// "00ffffff",
// "0000ffff"
// });
// img = identicon.generate(digest, 500);
// img.write("identicon_example_libravatar.png");
// }
return 0;
}

View File

@ -95,6 +95,7 @@ Magick::Image Identiconpp::generate_libravatar(const string &digest,
const uint16_t width,
const uint16_t height)
{
throw "Not implemented.";
Magick::Image img(Magick::Geometry(_columns, _rows),
Magick::Color("#" + _background));
return img;