17 #ifndef IDENTICONPP_HPP 18 #define IDENTICONPP_HPP 24 #include <Magick++/Image.h> 45 friend class Testiconpp;
77 explicit Identiconpp(
const uint8_t columns,
const uint8_t rows,
79 const string &background =
"ffffffff",
80 const vector<string> &foreground = {
"000000ff" },
81 const array<const uint8_t, 2> &padding = { 0, 0 });
91 Magick::Image
generate(
const string &digest,
const uint16_t width = 100);
95 const uint8_t _columns;
97 const string _background;
98 const vector<string> _foreground;
99 const array<const uint8_t, 2> _padding;
112 Magick::Image generate_ltr_symmetric(
const string &digest);
125 Magick::Image generate_ltr_asymmetric(
const string &digest);
138 Magick::Image generate_sigil(
const string &digest);
148 void check_entropy(
const string &digest,
algorithm type);
158 bool get_bit(
const uint16_t bit,
const string &digest);
170 Magick::Color get_color(
const uint16_t firstbit,
const string &digest);
179 static bool not_hex(
const char c);
186 void check_color(
const string &color);
189 #endif // IDENTICONPP_HPP algorithm
List of identicon algorithms.
Definition: identiconpp.hpp:49
Magick::Image generate(const string &digest, const uint16_t width=100)
Generates identicon from digest.
Definition: identiconpp.cpp:52
Base class for identiconpp.
Definition: identiconpp.hpp:42
Generates symmetric (vertically mirrored) identicons.
Identiconpp(const uint8_t columns, const uint8_t rows, algorithm type=algorithm::ltr_symmetric, const string &background="ffffffff", const vector< string > &foreground={ "000000ff" }, const array< const uint8_t, 2 > &padding={ 0, 0 })
Initialises an instance of Identiconpp.
Definition: identiconpp.cpp:24
Generates asymmetric identicons.