Skip to content

Import image

Sven edited this page Aug 8, 2017 · 2 revisions

Workflow to generate GCode of an image

Check Video below...

Preparation

  • Open desired picture in IrfanView
  • Decrease color depth to 256 colors
  • Import my individual palette "Stabilo_by_PN.pal" (Stabilo Fineliner colors) (/GRBL-Plotter/bin/Release/_misc/)
  • Decrease color depth again to a minimum (number of clearly differnent colors)
  • If needen: adapt wrong colors via "Show Paint dialog"
  • Save picture as png or gif without! transparency or save as bmp

Setup in GRBL-Plotter

  • Open reworked picture in GRBL-Plotter - 'Convert Image'
  • Define color which should not be used by a pen via 'Exceptions - Color': click on picture to set color
  • Test result (when given palette is applied) via 'Try colors from palette'
  • Try three different modes to calculate color difference between palette- and picture-color:
    • 0: Distance in RGB-Space: Math.Sqrt((c1.R - c2.R) * (c1.R - c2.R) + (c1.G - c2.G) * (c1.G - c2.G) + (c1.B - c2.B)*(c1.B - c2.B)); }
    • 1: Distance in color-hue (0°-360°)
    • 2: Distance in color-hue (0°-360°) + color-saturation + color-brightness
  • palette-color with lowest difference will be taken to draw a pixel

Export GCode

Tools are sorted by GCode length in descending order (Tool with most data to draw, first)

Import an image