Skip to content

Add some options to CreateThumbnail to allow for some customisation o… #19419

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

geekykayaker-anon
Copy link
Contributor

@geekykayaker-anon geekykayaker-anon commented Jul 22, 2024

Description

Currently the CreateThumbnail plugin writes out the form:
thumbnail begin <x>x<y>
My printer (Creality V3 KE) has a display which shows thumbnails, unfortunately it expects the headers to be formed:
png begin <x>*<y>

In addition to this, Moonraker ONLY seems to accept the first format, and not the second.

In order for thumbnails to appear both on my printer screen AND in Mainsail (which used Moonraker) I have to output each resolution twice, once for each format.

This MR adds support for toggling between:

  • 'thumbnail' and 'png
  • '*' and 'x'

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Test 1
I created a project with the old plugin, and set some settings.
My changes didn't impact those settings, and produced the same GCODE output when re-generated

Test 2:
I set inverted the first flag, and then got the expected behaviour in the GCODE.

Test 3:
I set inverted the second flag, and then got the expected behaviour in the GCODE.

Test 4:
With the each of the four combinations of the two new flags as steps, I can get all four combinations of output shown in a CGODE file.

Test Configuration:
MacOs Sequoia
Cura5

Checklist:

…ver the format of the begin block for the image
Copy link
Contributor

Test Results

23 881 tests  ±0   23 879 ✅ ±0   48s ⏱️ -1s
     1 suites ±0        2 💤 ±0 
     1 files   ±0        0 ❌ ±0 

Results for commit cda8c33. ± Comparison against base commit ee021f7.

@HellAholic HellAholic merged commit 247b512 into Ultimaker:main Jun 16, 2025
3 checks passed
@dvdmrtnz
Copy link

Current version of CreateThumbnail in Cura 5.10.0 actually seems to be working just fine with my Ender 3 V3 KE firmware version V1.1.0.15. I have simply added two thumbnails: One 96x96px thumbnail and another 300x300px and it's displayed just fine on the web interface and on the printer's display.

Gcode is using this format:

; thumbnail begin 300x300 38196

; thumbnail begin 96x96 7944

Here is full gcode:

CE3V3KE_xyzCalibration_cube.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Community Contribution 👑 Community Contribution PR's
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants