Image import into Snapmakerjs doesn't use image resolution information


#1

Hi Everyone,

I’ve noticed that with various images (in this case PNG format), that the Snapmakerjs software doesn’t use the image resolution information when uploading (importing) an image for laser engraving. It simply seems to scale everything by dividing the pixel size of the image by 10.

For example, an image that 200x200 pixels at 72 pixels/inch (i.e. 28.35 px/cm or 2.835 px/mm) is displayed and engraved as 20x20 mm. The actual size of the image should be 2.7x2.7 in. I’ve tried this with several other images at various resolutions (as defined in the PNG file itself). It just divides them by 10. My workaround for images that I want to be at actual size is to simply adjust the size using the “size” boxes in the interface.

It’s entirely possible I’m overlooking something in a setting someplace, or during the image upload import process. Is this by design or would it be considered a bug in the software?

Setup:

Snapmakerjs 2.2.2
macOS 10.12.5

Thanks in advance,

Dave


#2

Hi @dgohara

Doug the newbie here; I found it so much easier in using the Size fields as I had the print size in mind for the project. Less chance of errors.

Have a great weekend

Doug


#3

Hi Doug,

You’re right, it seems best to manually set it, It just didn’t occur to me what was happening until I needed something a specific dimension and realized what was happening.

I just wanted to be sure I wasn’t doing something wrong or missing something.

Thank you!

Dave


#4

Problem with the SnapmakerJS doing the resizes is that it cuts certain geometry. For example I created a measuring tape with CorelDraw (to be printed on a wooden bar for determining center of mass of a plane) with exact millimeter spacing, usual printout is exactly 1:1. Now I want to engrave, SnapmakerJS messes it up and stretches the 100mm to 123mm. Ok, set width to 100mm and voilà: some millimeter markings got lost due to rerendering the image!

Sorry, but I think this has to be fixed ASAP!

edit: Tested by interpolating I found out that setting the resolution of the original image to 253dpi comes closest to 1:1 scale.


#5

Hi Arnt,

Thanks for your feedback!

Snapmaker engineer here. I’ll try to reproduce the scaling issue recently. Theoretically the re-rendering problem will only effect the display of geometry on Canvas, but has no problem generating G-Code.

Before next updates of Snapmakerjs, you can try use SVG file (which can set exact print size of image, like 100mm) when you meet the precision issue.

Have a nice weekend!

Zheyong


#6

Hi Everyone,

From what I’ve determined, the issue is two-fold. One is that the actual size of the image on import isn’t what one would expect (the issue I and Arnt describe). The second is related to whether the pixel count is even or odd (which I believe may be causing the problem Arnt describes with missing lines).

My workaround(s) to address these problems (when using PNGs) has been:

  • Export the image from whatever software I’m using (in my case I’m exporting PNGs of circuit boards from a circuit design program called EasyEDA).

  • EasyEDA pads the image (unfortunately), so I open it in a photo editor program and change the canvas size to the actual size of the board outline. I make sure that resulting pixel count is an even number in both dimensions.

  • Import into SnapmakerJS and adjust one dimension to the proper size (the second dimension scales accordingly).

  • I hit preview, then increase the resolution (the default is 10 pixels/mm, so I might use 20 or 30). This may only affect what’s seen in the viewport as I recall seeing someplace that 10 px/mm is the highest. BUT, increasing this value at the very least seems to slow down the movement of the print head (which I would expect) and aliasing issues do appear to be reduced or eliminated.

    At this point my engravings with the laser end up being the correct size with no missing lines or artifacts.

    I believe if the software used the dpi information in the image to correctly set the sizes on import, much of this would go away. That is if the image in real units is 1in x 1in using the dpi information would produce an engraved product of the correct size.

    SVG may be a workable solution for some, but in my case EasyEDA doesn’t export the SVGs properly (obviously their problem not Snapmakers). So I end up having to do some form of digital gymnastics anyway.

    Let me you need more information. And thank you for your help with this.

Dave


#7

Check out Snapmakerjs v2.3.0, in this version we read the DPI information from image to determine the default density. Please let me know if there are missing lines or artifacts still.