From 992a1b3d2653ed527c2a301f80140bc35d84e832 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Mon, 2 Jan 2023 19:59:41 +0100 Subject: Switch from ImageMagick to GraphicsMagick for deterministic data; added tests --- whiteboard.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'whiteboard.cpp') diff --git a/whiteboard.cpp b/whiteboard.cpp index 3abccad..75472ba 100644 --- a/whiteboard.cpp +++ b/whiteboard.cpp @@ -24,8 +24,6 @@ #include #include -#include - #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()); -- cgit v1.2.3