(Showing Draft Content)

API for creating and modifying image data.

GcImageViewer allows you to create new or modify existing images using the following client API:

// Create empty image.
async newImage(options?: { width?: number; height?: number }) 

// Get unmodified image data url.
public getOriginalImageDataUrl(): string

// Get current image data url.
public getImageDataUrl(): string

// Modify current image data url.
public setImageDataUrl(dataUrl): Promise<void>

// Download the Image document loaded in the Viewer to the local disk.
public download(fileName?: string, getInitialVersion?: boolean) 

These examples show how to use the client API to create or modify images:


  • Modification of vector or multi-frame images (SVG, GIF, ICO, TIFF) is not supported.

  • Only static images can be modified.