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.
| Format | Fields | Processing on the server | Request types |
|---|---|---|---|
| PNG | PictureBase64, 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 |
| BMP | PictureBase64, 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 |
| SVG | VectorBase64, 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.
OptimizePngaccepts only PNG, SVG and AI. - Size: a value above 0 in
ACEParaBitmapOptimize.Resolutionreplaces the resolution of the file for every format. Leave it at 0 and set the size withACEParaOptimizeinstead; see Scaling. - Parameter objects: every Create request needs
ACEParaBitmapOptimize,ACEParaBitmapToVectorandACEParaBitmapToPunch, whatever the input format. SVG and AI requests also needACEParaVector; 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 withOptimizePngfirst: it returns the reason with HTTP 400 asOptimizePng 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:
| RequestData | Cause |
|---|---|
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.