Help with .lbrn file format needed

My goal is to automatically create .lbrn files to batch process laser engraving orders.
My original .lbrn file saved with LightBurn contains 1 image and 2 text objects, each located in their own layer.
I need to replace the image by another one (replace the image path), the strings of the 2 text objects as well as their font, and I need to adjust the laser power and travel speed of the 3 layers depending on the material to be engraved.
This is quite simple to do in the XML files but I have a problem with the image bitmap data that is cached in the files. The image object in the file not only contains the file name but also a “Data” field with the actual image bitmap. Simply replacing the filename without changing the Data field still shows the “old” image and I can’t find a way to “refresh” the cached image bitmap data. Deleting the Data field in the file doesn’t work either unfortunately. The file can still be loaded into LightBurn then but LightBurn doesn’t show any image after loading the file. Again no way to refresh the image.

Can anyone give me a hint on how to achieve my goal mentioned above?
Thanks in advance!

Hi there Christian!

Thats a very interesting use case, also quite outside the scope of what forum could usually support.

Suggestions if i may:

Maybe the devs could give you some ideas if the workflow is usable and or if there are work arrounds for the bitmap data.

Actually what you should do is replace the data tag with the text of the image encoded to binary. If you know Python, you could do that in a simple way.

But beyond that, what matters is that I think you could ask them to add the function of

  • replace image keeping the same settings, such as the applied mask and adjustment values
  • and also create variable images, as in the variable text function, where you can pass the path of the image.

Come on, create the suggestion and you will see that it is accepted.

PS: I use a translator

You can delete the <Tumbnail Source=… string (that contains the bitmap). LB doesn’t need that data to open the file. If you then SAVE the file, LB regenerates that data.