I have a wired offset between my image and the image mask

Hi everyone,

for quite some time I have noticed a wired offset between my image and the applied image mask. It’s probably “just 1 pixel” but if a fine mask is applied to a very huge image it get’s very annoying, see pictures below.

Here are parts of the view in Lightburn:

And here of the preview:

As the image is really huge the offset here is about 1 mm, which is pretty much visible (one grid in the background is 1 mm):

I wonder if anyone else has also this issue and if there is some kind of a solution for it.


How are you creating the mask?

Can you share the .lbrn file for review?

It’s actually pretty simple. Just scale any image quite large, put a geometry over it and select “Apply Mask to Image”:

ImageMaskOffsetExample.lbrn2 (168.7 KB)


Let me ask in a different way. How are you creating the geometry for the mask?

I think the geometry doesn’t really matter. In my examples they were SVGs. But you can also just put any geometry from within Lightburn over the image as an image mask, like here:



I’ve taken a closer look at it.

I think there are a couple of things going on:

  1. You’re starting with a fairly low resolution image, then taking a small portion of it, and then tremendously increasing the DPI for that small portion. The accumulated errors in that process exaggerate any misalignment.
  2. There may be some level of inherent misalignment resulting from rounding that may or may not be a bug.

At this moment, you’ll only be able to affect the former. You can mitigate this by working with higher resolution input. Here’s an example where the input resolution of the image is 2x the output resolution.

Thank you for taking the time!

I’ve also noticed this behavior in the past with higher resolution images, but it’s indeed not that prominent. But that’s why I came to the conclusion that it might be a bug (an offset by 1 pixel, maybe because of rounding issues or whatever).

Here is an example:

Unfortunately I can’t just upscale my image and apply the mask afterwards so that this offset is not that much of a deal because the image will get that big that Lightburn will just crash (or take forever to process or the resulting RD file will not fit within the 100 MB memory of my Ruida controller).

So I’m humbly hoping that it is something that went unnoticed so far and could acceptable easily be fixed.


As long as the final dpi is the same I don’t see why input size would make a difference.

Part of the misalignment is going to be inherent in the process. The resampling process that LightBurn goes through will be limited in resolution by the DPI set. So all raster components will be quantized to that DPI limit and basically fit into a grid. The lines in the mask don’t follow the same limitation and are limited to the rounding within LightBurn. This will always result in a discrepancy between DPI grid to outline.

How do you plan to use this in the end? Are you using the mask to cut out the shapes or is it only as an outline?

If cutting out, then perhaps use a strategy where the image bleeds beyond the cut shapes. So you’d have separate layers for the mask and the actual cut. Where the mask is thicker than the cut shapes.

If this is an outline then perhaps integrate the outline into the raster image and don’t rely on Image mask functionality for the outline.

I will try to do that and I will come back with my results. I recall trying that in the past and having some issues with that approach, but I might be mistaken.

This is indeed a nice approach that I will also try as it will get cut out. In the past I have copied my geometry and have aligned it until it has fit with the image. But that was a quite tedious task.

Nevertheless, I would appreciate it if the Development Team could evaluate this as well and see if it’s something that might be fixed within Lightburn in the future.


Let’s ask @Rick for comment. The LightBurn guys seem busy addressing the new release so may not have immediate bandwidth but let’s see.