With the /AutoDigitize endpoint user can digitize images (.png, .jpeg, .jpg, .tiff)
POST
/api/AutoDigitize/Digitize
Digitize image
Request Example
Usage Digitize is called first to upload an image and digitize it. ReDigitize can be called after Digitize when the user wants to change the maximum number of colors (NumColors). ChangeDigitizedImageColors can be called after Digitize or ReDigitize when the user wants to update the colors of the digitized image. /api/AutoDigitize/Digitize FormData File: Posted filestream NumColors: 15, // Required. Maximum number of colors for the digitize process ApplyEmbroideryPattern: false, // Optional. Applies a layer on top of the updated digitized image which simulates a stitching effect Unit: "pixels", // Optional. Possible values: "cm", "inches", "pixels" Density: "Low" // Optional. Density of stiches used for calculating StichEstimation. Possible values: "Low", "Medium", "High"
Response Example
{ "Data": { "DesignColors": [ // The image colors { "Blue": 0, "Red": 0, "Green": 0, "Alpha": 255, "Code": null, "Name": null, "Manufacturer": null, "RelColor": 0, // Used for drawing stitches, The index of the needle (color) in the palette "Value": "000000" }, ... { "Blue": 242, "Red": 38, "Green": 87, "Alpha": 255, "Code": null, "Name": null, "Manufacturer": null, "RelColor": 0, // Used for drawing stitches, The index of the needle (color) in the palette "Value": "2657F2" } ], "ActualColors": [ // Mapping between the image colors and the available embroidery palette colors (The latter is what will be displayed to the user) { "DesignColor": { // The image color "Blue": 0, "Red": 0, "Green": 0, "Alpha": 255, "Code": null, "Name": null, "Manufacturer": null, "RelColor": 0, // Used for drawing stitches, The index of the needle (color) in the palette "Value": "000000" }, "PaletteColor":{ // The embroidery palette color "Blue": 0, "Red": 0, "Green": 0, "Alpha": 255, "Code": "001010", "Name": "Black", "Manufacturer": null, "RelColor": 0, // Used for drawing stitches, The index of the needle (color) in the palette "Value": null }, "NumPixels": 104022, "NumPixelsPercentage": 41.6088 }, ... { "DesignColor": { // The image color "Blue": 242, "Red": 38, "Green": 87, "Alpha": 255, "Code": null, "Name": null, "Manufacturer": null, "RelColor": 0, // Used for drawing stitches, The index of the needle (color) in the palette "Value": "2657F2" }, "PaletteColor": { // The embroidery palette color "Blue": 150, "Red": 0, "Green": 87, "Alpha": 255, "Code": "1076", "Name": "1076 - Sapphire", "Manufacturer": null, "RelColor": 0, // Used for drawing stitches, The index of the needle (color) in the palette "Value": null }, "NumPixels": 30157, "NumPixelsPercentage": 12.0628 } ], "MaxNumColors": 3, "Preview": "base64 preview string", "Filename": "ybmFG_4k0UeqCwmiSJvXOA_status0", "DPI": 72, "Width": 500, // Depends on the Unit. Possible values: "cm", "inches", "pixels" "Height": 500, // Depends on the Unit. Possible values: "cm", "inches", "pixels" "StitchEstimation": 120563.27160493826, "Unit": "pixels" }, "Success": true, "Errors": null }