summaryrefslogtreecommitdiffhomepage
path: root/whiteboard.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2023-01-02 19:59:41 +0100
committerRoland Reichwein <mail@reichwein.it>2023-01-02 19:59:41 +0100
commit992a1b3d2653ed527c2a301f80140bc35d84e832 (patch)
tree73981b8a28a0368f2b74b0369b1ecf649c908f77 /whiteboard.cpp
parent20ceb53ec1c1bc18face8e831292dfe81fed3817 (diff)
Switch from ImageMagick to GraphicsMagick for deterministic data; added tests
Diffstat (limited to 'whiteboard.cpp')
-rw-r--r--whiteboard.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/whiteboard.cpp b/whiteboard.cpp
index 3abccad..75472ba 100644
--- a/whiteboard.cpp
+++ b/whiteboard.cpp
@@ -24,8 +24,6 @@
#include <boost/algorithm/string/trim.hpp>
#include <boost/property_tree/xml_parser.hpp>
-#include <ImageMagick-6/Magick++.h>
-
#include "libreichwein/file.h"
#include "config.h"
@@ -116,7 +114,7 @@ int Whiteboard::run(int argc, char* argv[])
std::thread storage_cleanup_thread(std::bind(&Whiteboard::storage_cleanup, this));
- Magick::InitializeMagick(NULL); // for qrcode.cpp
+ QRCode::init();
int result = FCGX_Init();
if (result != 0) { // error on init
@@ -204,7 +202,7 @@ int Whiteboard::run(int argc, char* argv[])
if (url.size() > 1000)
throw std::runtime_error("URL too big");
- std::string pngdata {getQRCode(url)};
+ std::string pngdata {QRCode::getQRCode(url)};
FCGX_PutS("Content-Type: image/png\r\n", request.out);
FCGX_FPrintF(request.out, "Content-Length: %d\r\n\r\n", pngdata.size());