From 47498123af4c3327c8dc199d1d22d68e72215f59 Mon Sep 17 00:00:00 2001 From: tastytea Date: Mon, 7 Jan 2019 13:57:41 +0100 Subject: [PATCH] 2019-01-07 --- docs/identiconpp__c_8h_source.html | 2 +- docs/index.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/identiconpp__c_8h_source.html b/docs/identiconpp__c_8h_source.html index 2c63c82..0771dcb 100644 --- a/docs/identiconpp__c_8h_source.html +++ b/docs/identiconpp__c_8h_source.html @@ -47,7 +47,7 @@ $(function() {
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_H
18 #define IDENTICONPP_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_H
uint64_t identiconpp_generate(const char magick[], const char digest[], const uint16_t width)
Generates identicon from digest.
Definition: c_interface.cpp:81
+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
diff --git a/docs/index.html b/docs/index.html index 37115c1..c7ecde9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -71,7 +71,7 @@ $(function() {

The "sigil" algorithm generates the same results as sigil and pydenticon.

Example

{C++}
// Compile with g++ $(Magick++-config --cppflags --ldflags) -lidenticonpp
#include <identiconpp.hpp>
#include <Magick++/Image.h>
int main()
{
Identiconpp identicon(5, 5, Identiconpp::algorithm::ltr_symmetric,
"ffffff80", { "800000ff" }, { 10, 10 });
Magick::Image img;
img = identicon.generate("55502f40dc8b7c769880b10874abc9d0", 200);
img.write("identicon.png");
}

C interface

-

This is somewhat experimental. Have a look at example.c.

+

This is somewhat experimental. Have a look at example.c and identiconpp_c.h.

It seems to be impossible to use Magick++ and MagickWand in the same library, so the images are returned as base64-encoded strings.

Install

Gentoo

@@ -109,7 +109,7 @@ $(function() {

To generate a binary package, execute make package

Contributing

-

Contributions are always welcome. You can submit them as pull requests or via email to tastytea<tt>tastytea.de.

+

Contributions are always welcome. You can submit them as pull requests on schlomp.space or via email to tastytea<tt>tastytea.de (ideally using git format-patch or git send-email). Please do not submit them via GitHub, it is just a mirror.

Contact

See https://tastytea.de/

License & Copyright