Automated Computed Embroidery

Automated Computed Embroidery (ACE)

The ACE function (Automated Computed Embroidery) creates embroidery data automatically from image data. Send the requests with "Client": "ACE"; see Example Request.

Supported input formats

Each request contains exactly one source: a pixel image in PictureBase64 with PictureType, or a vector file in VectorBase64 with VectorType. Send the file as plain Base64, without a data-URL prefix, and the type value in upper case.

FormatFieldsProcessing on the serverRequest types
PNGPictureBase64, PictureType: "PNG"Full server-side optimization (color reduction, scaling, background detection) with ACEParaOptimize. Transparency is supported. The resolution stored in the file sets the size; 96 DPI is assumed if none is stored. Recommended format.CreateTC, CreatePNG, CreateStatPNG, CreateACEPng, CreateACEVector, OptimizePng
JPG (.jpg, .jpeg)PictureBase64, PictureType: "JPG"Passed to the embroidery step without the ACEParaOptimize optimization; only ACEParaBitmapOptimize reduces the colors. The resolution stored in the file sets the size; 300 DPI is assumed if none is stored. Use "JPG" for .jpeg files too; "JPEG" is rejected.CreateTC, CreatePNG, CreateStatPNG, CreateACEPng, CreateACEVector
BMPPictureBase64, PictureType: "BMP"Like JPG: passed to the embroidery step without the ACEParaOptimize optimization; only ACEParaBitmapOptimize reduces the colors. The resolution stored in the file sets the size; 300 DPI is assumed if none is stored.CreateTC, CreatePNG, CreateStatPNG, CreateACEPng, CreateACEVector
SVGVectorBase64, VectorType: "SVG"Rasterized on the server at 300 DPI and then optimized like a PNG. The 100 % size is the document size if its longer side is between about 43 mm and 347 mm; smaller documents start at 43 mm, larger ones at 347 mm. See Scaling.CreateTC, CreatePNG, CreateStatPNG, CreateACEPng, CreateACEVector, OptimizePng
AI (Adobe Illustrator)VectorBase64, VectorType: "AI"Like SVG. The file must be saved PDF-compatible; the first artboard is rasterized.CreateTC, CreatePNG, CreateStatPNG, CreateACEPng, CreateACEVector, OptimizePng
  • PNG is the recommended format. Convert JPG and BMP files to PNG to use the color reduction, scaling and background detection of Optimize. OptimizePng accepts only PNG, SVG and AI.
  • Size: a value above 0 in ACEParaBitmapOptimize.Resolution replaces the resolution of the file for every format. Leave it at 0 and set the size with ACEParaOptimize instead; see Scaling.
  • Parameter objects: every Create request needs ACEParaBitmapOptimize, ACEParaBitmapToVector and ACEParaBitmapToPunch, whatever the input format. SVG and AI requests also need ACEParaVector; an empty object {} is enough.
  • SVG or AI that cannot be rasterized, for example an SVG without width, height and viewBox or an AI file that was not saved PDF-compatible, makes a Create request fail with HTTP 503 and Communication with GiS ASPWebService failed!. Test new files with OptimizePng first: it returns the reason with HTTP 400 as OptimizePng failed: ….
  • Other formats, such as GIF, TIFF, WebP or EPS, are rejected. Convert them to PNG, SVG or AI first.
Input errors

Create requests (CreateTC, CreatePNG, CreateStatPNG, CreateACEPng, CreateACEVector) check the input first. These errors return Success: false with HTTP status 400:

RequestDataCause
No PictureBase64 or VectorBase64 data provided!No source was sent.
No PictureType or VectorType provided!Neither type field was sent. Send PictureType with PictureBase64, and VectorType with VectorBase64.
Only image or vector data may be specified!PictureBase64 and VectorBase64 were both sent.
No ACEBitmapPara provided!SVG/AI request without ACEParaBitmapOptimize, ACEParaBitmapToVector and ACEParaBitmapToPunch.
No ACEVectorPara provided!SVG/AI request without ACEParaVector.
Invalid PictureType …Unsupported pixel format.
Invalid VectorType …Unsupported vector format.

OptimizePng has its own input check and messages; see Optimize.

Parameters

Parameter Type Description Required
Client string "ACE". Routes the request to the ACE service. Yes
PictureType string "PNG", "JPG" or "BMP", in upper case. Required together with PictureBase64. No
PictureBase64 string The PNG, JPG or BMP file as Base64, without a data-URL prefix. Send either PictureBase64 or VectorBase64, not both. No
VectorType string "SVG" or "AI", in upper case. Required together with VectorBase64. No
VectorBase64 string The SVG or AI file as Base64. It is rasterized on the server. Send either VectorBase64 or PictureBase64, not both. No