Thumbnail Formats Option Ported from PrusaSlicer and add BIQU/BTT format (#2405)

* Add needed src files and update CMake files

* Implementation of GCodeThumbnailsFormat for PNG, JPG, and QOI complete

* Implement BIQU (Big Tree Tech) Thumbnail Format

* have GCodeProcessor.post_process pass through original line end characters

* fix biqu thumbnail output
use \r\n for new lines in the biqu thumbnail portion. the firmware requires these end characters to function properly.
update names of variables and add comments to be more descriptive
replace modified Qt pixel algorithm with much simpler algorithm from BTT TFT firmware

* rename BiQU to BTT_TFT for better clarity

* remove underscore from GUI option

---------

Co-authored-by: SoftFever <103989404+SoftFever@users.noreply.github.com>
This commit is contained in:
Ocraftyone 2023-10-17 08:00:38 -04:00 committed by GitHub
parent 25c9b43d62
commit 4d14ee15ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 1124 additions and 50 deletions

View file

@ -668,7 +668,10 @@ void GCodeProcessor::TimeProcessor::post_process(const std::string& filename, st
if (eol) {
++line_id;
gcode_line += "\n";
// determine the end of line character and pass to output
gcode_line += *it_end;
if(*it_end == '\r' && *(++ it_end) == '\n')
gcode_line += '\n';
// replace placeholder lines
auto [processed, lines_added_count] = process_placeholders(gcode_line);
if (processed && lines_added_count > 0)