mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 01:37:53 -06:00
Fix btt tft thumbnail regression (#3056)
fix btt tft thumbnail regression
This commit is contained in:
parent
933aa3050b
commit
b218d81d38
1 changed files with 2 additions and 2 deletions
|
@ -44,7 +44,6 @@ inline void export_thumbnails_to_file(ThumbnailsGeneratorCallback &thumbnail_cb,
|
|||
short i = 0;
|
||||
for (const ThumbnailData &data : thumbnails) {
|
||||
if (data.is_valid()) {
|
||||
output("; THUMBNAIL_BLOCK_START\n");
|
||||
auto compressed = compress_thumbnail(data, format);
|
||||
if (compressed->data && compressed->size) {
|
||||
if (format == GCodeThumbnailsFormat::BTT_TFT) {
|
||||
|
@ -54,6 +53,7 @@ inline void export_thumbnails_to_file(ThumbnailsGeneratorCallback &thumbnail_cb,
|
|||
if (i == (thumbnails.size() - 1))
|
||||
output("; bigtree thumbnail end\r\n\r\n");
|
||||
} else {
|
||||
output("; THUMBNAIL_BLOCK_START\n");
|
||||
std::string encoded;
|
||||
encoded.resize(boost::beast::detail::base64::encoded_size(compressed->size));
|
||||
encoded.resize(boost::beast::detail::base64::encode((void *) encoded.data(), (const void *) compressed->data,
|
||||
|
@ -71,10 +71,10 @@ inline void export_thumbnails_to_file(ThumbnailsGeneratorCallback &thumbnail_cb,
|
|||
output((boost::format("; %s\n") % encoded).str().c_str());
|
||||
|
||||
output((boost::format("; %s end\n") % compressed->tag()).str().c_str());
|
||||
output("; THUMBNAIL_BLOCK_END\n\n");
|
||||
}
|
||||
throw_if_canceled();
|
||||
}
|
||||
output("; THUMBNAIL_BLOCK_END\n\n");
|
||||
|
||||
i++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue