identiconpp  0.4.0
identiconpp_c.h
Go to the documentation of this file.
1 /* This file is part of identiconpp.
2  * Copyright © 2019 tastytea <tastytea@tastytea.de>
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, version 3.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef IDENTICONPP_C_H
18 #define IDENTICONPP_C_H
19 
20 #ifdef __cplusplus
21 extern "C"
22 {
23 #endif
24 
25  #include <stdbool.h>
26  #include <stdint.h>
27  #include <stddef.h>
28 
38  typedef enum
39  {
51 
65  bool identiconpp_setup(const uint8_t columns, const uint8_t rows,
67  const char background[9],
68  const char foreground[][9],
69  const uint8_t foreground_len,
70  const uint8_t padding[2]);
71 
81  uint64_t identiconpp_generate(const char magick[],
82  const char digest[], const uint16_t width);
83 
88  const char *identiconpp_base64();
89 
90 #ifdef __cplusplus
91 }
92 #endif
93 #endif // IDENTICONPP_C_H
uint64_t identiconpp_generate(const char magick[], const char digest[], const uint16_t width)
Generates identicon from digest.
Definition: c_interface.cpp:81
Generates asymmetric identicons.
Definition: identiconpp_c.h:43
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.
Definition: c_interface.cpp:33
Generates symmetric (vertically mirrored) identicons.
Definition: identiconpp_c.h:41
Definition: identiconpp_c.h:49
identiconpp_algorithm
List of identicon algorithms.
Definition: identiconpp_c.h:38
const char * identiconpp_base64()
Return base64-encoded string of the image generated with identiconpp_generate().
Definition: c_interface.cpp:100