mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
FIX: CLI: fix a 3mf saving issue
some model returns -122 which is caused by the picture size not aligned JIRA: no jira Change-Id: I6501403262dfd271e3022ef70ee11b1ac4d6651b
This commit is contained in:
parent
2e2fe7506c
commit
bdaabf614b
1 changed files with 5 additions and 2 deletions
|
@ -5890,8 +5890,11 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
|||
/* step width and step height */
|
||||
int sw = thumbnail_data.width / PLATE_THUMBNAIL_SMALL_WIDTH;
|
||||
int sh = thumbnail_data.height / PLATE_THUMBNAIL_SMALL_HEIGHT;
|
||||
for (int i = 0; i < thumbnail_data.height; i += sh) {
|
||||
for (int j = 0; j < thumbnail_data.width; j += sw) {
|
||||
int clampped_width = sw * PLATE_THUMBNAIL_SMALL_WIDTH;
|
||||
int clampped_height = sh * PLATE_THUMBNAIL_SMALL_HEIGHT;
|
||||
|
||||
for (int i = 0; i < clampped_height; i += sh) {
|
||||
for (int j = 0; j < clampped_width; j += sw) {
|
||||
int r = 0, g = 0, b = 0, a = 0;
|
||||
for (int m = 0; m < sh; m++) {
|
||||
for (int n = 0; n < sw; n++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue