Generate preview image for bitmap artwork

Generate preview image for bitmap artwork

The bitmapArtPreview API method converts a bitmap image into a transparent PNG by removing its background. It supports multiple bitmap formats, including: JPG, GIF, BMP, TIFF, and PNG. If the input image is already a PNG or GIF with transparent pixels, it simply converts or returns the file as needed.


POST parameters

ParameterTypeRequiredDescription
appIdString✅App ID from your Wilcom Developer Portal account.
appKeyString✅App Key from your Wilcom Developer Portal account.
requestXml
String
✅
An XML string specifying the bitmap image to process.


XML structure

<xml>
  <bitmap ... />       <!-- Bitmap processing instructions -->
  <files>
    <file filename="uploaded_logo.jpg" filecontents="..." /> <!-- Bitmap image file to process -->
  </files>
</xml>


Response

On success, the API returns an XML string containing information about the source bitmap and the resulting PNG file:

<xml>
  <source_bitmap_info transparent="true" />    <!-- Input bitmap had transparency -->
  <files>
    <file filename="converted_logo.png" filecontents="..." />  <!-- Output PNG -->
  </files>
</xml>

XML components

ComponentDetails
<bitmap>Specifies which bitmap file referenced in <files> will be processed.
<files>Includes both the original bitmap (as received) and the resulting PNG file with transparency. 
<file>Simple preview image.
Returns metadata about the input bitmap, such as dimensions and transparency details. 


Remarks

  1. Use the bitmapArtPreview API as a pre-processor before vectorization or digitizing.
  2. There are specific limitations on input bitmap files for auto-digitizing. Refer to Auto-digitize artwork limitations for guidelines and best practices.
  3. Input format can be any bitmap format supported by Wilcom. If:
    1. PNG has transparency → returned as-is.
    2. GIF has transparency → converted to PNG.
    3. Other formats → background removed and converted to PNG.
  4. Supported bitmap formats are listed in Supported formats section of this document.