identiconpp
0.6.1
|
C interface for identiconpp. More...
#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>
Go to the source code of this file.
Enumerations | |
enum | identiconpp_algorithm { identiconpp_ltr_symmetric, identiconpp_ltr_asymmetric, identiconpp_sigil } |
List of identicon algorithms. More... | |
Functions | |
bool | identiconpp_setup (const uint8_t columns, const uint8_t rows, identiconpp_algorithm type, const char background[9], const char foreground[][9], const uint8_t foreground_len, const uint8_t padding[2]) |
Setup identicon parameters. More... | |
uint64_t | identiconpp_generate (const char magick[], const char digest[], const uint16_t width) |
Generates identicon from digest. More... | |
const char * | identiconpp_base64 () |
Return base64-encoded string of the image generated with identiconpp_generate(). More... | |
C interface for identiconpp.
List of identicon algorithms.
Enumerator | |
---|---|
identiconpp_ltr_symmetric | Generates symmetric (vertically mirrored) identicons. |
identiconpp_ltr_asymmetric | Generates asymmetric identicons. |
identiconpp_sigil | Generates the same results as sigil and pydenticon. |
const char* identiconpp_base64 | ( | ) |
Return base64-encoded string of the image generated with identiconpp_generate().
uint64_t identiconpp_generate | ( | const char | magick[], |
const char | digest[], | ||
const uint16_t | width | ||
) |
Generates identicon from digest.
magick | See http://imagemagick.org/script/formats.php |
digest | The pre-computed digest |
width | The width of the identicon |
bool identiconpp_setup | ( | const uint8_t | columns, |
const uint8_t | rows, | ||
identiconpp_algorithm | type, | ||
const char | background[9], | ||
const char | foreground[][9], | ||
const uint8_t | foreground_len, | ||
const uint8_t | padding[2] | ||
) |
Setup identicon parameters.
columns | Number of columns |
rows | Number of rows |
type | The algorithm to use |
background | Background color, hexadecimal, rrggbbaa |
foreground | Array of foreground colors |
foreground_len | Length of the array of foreground colors |
padding | Padding in pixels { left & right, top & down } |