1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-12-07 16:06:35 +01:00

Add possibility to save QR code in PNG file format

This commit is contained in:
Ansa89
2016-10-05 11:55:45 +02:00
parent e17fa89d8f
commit 958df9f2e8
12 changed files with 234 additions and 67 deletions

View File

@@ -25,11 +25,21 @@
#define QRCODE_FILENAME_EXT ".QRcode"
/* Converts a tox ID string into a QRcode and prints it to the given file stream.
/* Converts a tox ID string into a QRcode and prints it into the given filename.
*
* Returns 0 on success.
* Returns -1 on failure.
*/
int ID_to_QRcode(const char *tox_id, FILE *fp);
int ID_to_QRcode_txt(const char *tox_id, const char *outfile);
#ifdef QRPNG
#define QRCODE_FILENAME_EXT_PNG ".QRcode.png"
/* Converts a tox ID string into a QRcode and prints it into the given filename as png.
*
* Returns 0 on success.
* Returns -1 on failure.
*/
int ID_to_QRcode_png(const char *tox_id, const char *outfile);
#endif /* QRPNG */
#endif /* QR_CODE */