Home / Forum / Software / Image2Gcode – Free Raster Image Laser Engraving Software – Modified for MPCNC / Reply To: Image2Gcode – Free Raster Image Laser Engraving Software – Modified for MPCNC
@Didier Thanks for the details, that was a big help. Please try the attached file to see if the “Move to top left corner” code is correct now. I didn’t spend any time debugging the “enable decimal values” function and decided to disable it instead. It was experimental and was found to make no difference as Marlin/Arduino use 8-bit PWM (0-255 integer) to control the laser so decimals would be useless and just add extra gcode bloat.
The optimized laser function was added by Bryan and he hasn’t been active on the forum for a while now. I’ll explain what it does but I didn’t code it so I may be mistaken. The laser power values range from 0 for all white, to 255,or whatever your max value is set to , for all black. This program does raster engraving which moves over the entire image, line by line, one pixel at a time. Optimizing is meant to speed up laser engraving by combining moves with power values of zero to save time. The ‘threshold’ value allows you to skip values further above zero to speed up and ignore very light colors. It works well but I think the overall quality of the image is slightly better without this function because the laser head will be at a fixed speed throughout the engraving.
If you have a vector image that’s just a line drawing then the fastest engraving will be from a tool like dxf2gcode which is posted in another thread. Image2Gcode’s strength is grayscale engraving like photographs and things like that. Let me know if the attached file works and if it does, I’ll post it up top. I probably won’t bother with GitHub since active development is just me at this point and I don’t plan on adding any new features, just debugging as needed.