LightBurn UDP automation + GCode import questions

@NicholasL That’s an interesting idea - basically create a small pre-job to get the laser head to the origin of interest & post-job to return it to the origin using a ‘dummy’ lbrn2 file template. Your python script looks similar to my own :grin:

For an even bigger picture this is part of a project to make what amounts to an automated ‘laser’ photobooth - someone presses a button, picture gets taken & they will get an engraved puck with their own image and the same image will be engraved on a larger wall (so you can see the history of all previous images):

The python Pillow library allows you to add a transparent background very easily via ImageOps.expand - ImageOps module - Pillow (PIL Fork) 11.3.0 documentation. While I haven’t tried it yet, I’m hoping LB ignores transparent pixels - you can imagine in the above image if I’m attempting to engrave on the larger wall I could ‘expand’ the image like in my previous post (ie red = added transparency, green = image, which I think you already got).

Since I am doing some image post processing currently via Pillow it might be the easier route but I’ll take a look into your pre/post LB job as well. Thanks for the suggestions! I’ll let you know if I run into any more issues re LightBurn. Also obviously always willing to hear more ideas.

PS: bemusingly my only other post on this forum was an attempt at deciphering lbrn2 file formatting to do something very similar - ie use python to load files via XML & attempt changing x/y/rotations/etc but for already existing images/files, not dynamic like here :grin: Lbrn2 File Format Questions - origin point? - #5 by Nis