mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-27 12:52:07 +00:00
Add ColPic encoding for thumbnails(;gimage/;simage) as metadata.
This will enable showing preview images on QIDI/Elegoo machines
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "../Point.hpp"
|
||||
#include "../PrintConfig.hpp"
|
||||
#include "PrintConfig.hpp"
|
||||
#include "ThumbnailData.hpp"
|
||||
|
||||
#include <vector>
|
||||
@@ -52,7 +53,15 @@ inline void export_thumbnails_to_file(ThumbnailsGeneratorCallback &thumbnail_cb,
|
||||
output((char *) compressed->data);
|
||||
if (i == (thumbnails.size() - 1))
|
||||
output("; bigtree thumbnail end\r\n\r\n");
|
||||
} else {
|
||||
}
|
||||
else if (format == GCodeThumbnailsFormat::ColPic) {
|
||||
if (i == 0) {
|
||||
output((boost::format("\n\n;gimage:%s\n\n") % reinterpret_cast<char*>(compressed->data)).str().c_str());
|
||||
} else {
|
||||
output((boost::format("\n\n;simage:%s\n\n") % reinterpret_cast<char*>(compressed->data)).str().c_str());
|
||||
}
|
||||
}
|
||||
else {
|
||||
output("; THUMBNAIL_BLOCK_START\n");
|
||||
std::string encoded;
|
||||
encoded.resize(boost::beast::detail::base64::encoded_size(compressed->size));
|
||||
|
||||
Reference in New Issue
Block a user