summary refs log tree commit diff stats
path: root/lingo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lingo.cpp')
-rw-r--r--lingo.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/lingo.cpp b/lingo.cpp index 61a1f71..6ba60a9 100644 --- a/lingo.cpp +++ b/lingo.cpp
@@ -808,8 +808,15 @@ private:
808 throw std::runtime_error("Could not find image for green hint."); 808 throw std::runtime_error("Could not find image for green hint.");
809 } 809 }
810 810
811 genpuzzle.attachment_name = std::string("SPOILER_image.") + extension; 811 Magick::Blob inputblob(image.c_str(), image.length());
812 genpuzzle.attachment_content = std::move(image); 812 Magick::Image inputimg;
813 inputimg.read(inputblob);
814 inputimg.magick("png");
815 Magick::Blob outputblob;
816 inputimg.write(&outputblob);
817
818 genpuzzle.attachment_name = "SPOILER_image.png";
819 genpuzzle.attachment_content = std::string((const char*) outputblob.data(), outputblob.length());
813 } else { 820 } else {
814 double fontsize = 72; 821 double fontsize = 72;
815 std::string renderWord = solution.getText(); 822 std::string renderWord = solution.getText();