[Feature Request] Put a JPEG in it

Snapmaker has the ability to display a picture before you start a job. The way it works is that it just needs a base64 image added to the header file.

I see there’s already a preview thumbnail (Thumbnail) in the lbrn2 file, and there’s also already a header added to the gcode when exporting gcode while active device is a snapmaker.

It’d be great if you could just put the 2 pieces together, and add the thumbnail attribute to the snapmaker header:

;Header Start
;header_type: laser
;max_x(mm): {max_x}
;max_y(mm): {max_y}
;max_z(mm): {max_z}
;max_b(mm): {max_b}
;min_x(mm): {min_x}
;min_y(mm): {min_y}
;min_b(mm): {min_b}
;min_z(mm): {min_z}
;work_size_x: {work_size_x}
;work_size_y: {work_size_y}
;origin: {start_position}
;thumbnail: data:image/png;base64,{LightBurnProject.Thumbnail}
;Header End

I’ve tested manually injecting the cut preview into my gcode files, and it seems to work fine. Here’s an example from a recent project: https://drive.google.com/file/d/1D9gSmEHoqmmO-Wi4TU7Uu1aMPE96IgdA/view?usp=share_link

I think you might need to make this public. :slight_smile:

Oops, thought I had done that, public now.