# Interface ImageRendererOptions

GoJS® Diagramming Components
version 3.0.7
by Northwoods Software®

#### Hierarchy

- DiagramRendererOptions
  - ImageRendererOptions

Used for the options argument to Diagram.makeImage and Diagram.makeImageData.

#####
Index

### Properties

details?
returnType?
type?

#####
Inherited Index

### Properties

DiagramRendererOptions.background
DiagramRendererOptions.callback
DiagramRendererOptions.callbackTimeout
DiagramRendererOptions.document
DiagramRendererOptions.maxSize
DiagramRendererOptions.padding
DiagramRendererOptions.parts
DiagramRendererOptions.position
DiagramRendererOptions.scale
DiagramRendererOptions.showGrid
DiagramRendererOptions.showTemporary
DiagramRendererOptions.size

## Properties

### `Optional` details
: ObjectData

The optional details to pass to the HTMLCanvasElement's toDataURL function. If the type is `"image/jpeg"` then this can be a number from `0` to `1`, inclusive, describing the desired jpeg quality.

### `Optional` returnType
: string

The optional return type of the image data. Valid values are `"ImageData"`, `"Image"`, `"string"`, and `"blob"`. The `"string"` option returns a base64 string representation of the image. The `"ImageData"` option returns an `ImageData` object representation of the image. The `"Image"` option returns an `HTMLImageElement` using `ImageData` as the `HTMLImageElement.src`. The `"blob"` option requires that the callback property is also defined. The default value is `"string"`, and unrecognized values will return a string.

### `Optional` type
: string

The optional MIME type of the image. Valid values are typically `"image/png"` and `"image/jpeg"`. Some browsers allow `"image/webp"`. The default value is `"image/png"`, and unrecognized values will defer to the default.

Copyright © 1998-2024 by Northwoods Software Corporation.