# JSDoc: Class: ImageStim

# Class: ImageStim

## visual.ImageStim(options)

#### new ImageStim(options)

Image Stimulus.

##### Parameters:

Name | Type | Description
--- | --- | ---

`options`

Object

###### Properties

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`name` | String |  |  | the name used when logging messages from this stimulus
`win` | Window |  |  | the associated Window
`image` | string | HTMLImageElement |  |  | the name of the image resource or the HTMLImageElement corresponding to the image
`mask` | string | HTMLImageElement |  |  | the name of the mask resource or HTMLImageElement corresponding to the mask
`units` | string | <optional> | "norm" | the units of the stimulus (e.g. for size, position, vertices)
`pos` | Array.<number> | <optional> | [0, 0] | the position of the center of the stimulus
`units` | string | <optional> | 'norm' | the units of the stimulus vertices, size and position
`ori` | number | <optional> | 0.0 | the orientation (in degrees)
`size` | number | <optional> |  | the size of the rendered image (the size of the image will be used if size is not specified)
`color` | Color | <optional> | 'white' | the background color
`opacity` | number | <optional> | 1.0 | the opacity
`contrast` | number | <optional> | 1.0 | the contrast
`depth` | number | <optional> | 0 | the depth (i.e. the z order)
`texRes` | number | <optional> | 128 | the resolution of the text
`interpolate` | boolean | <optional> | false | whether or not the image is interpolated
`flipHoriz` | boolean | <optional> | false | whether or not to flip horizontally
`flipVert` | boolean | <optional> | false | whether or not to flip vertically
`autoDraw` | boolean | <optional> | false | whether or not the stimulus should be automatically drawn on every frame flip
`autoLog` | boolean | <optional> | false | whether or not to log

Mixes In:
  - ColorMixin
Source:
  - visual/ImageStim.js, line 18

### Extends

- VisualStim

### Members

#### setImage

Setter for the image attribute.

Source:
  - visual/ImageStim.js, line 106

#### setMask

Setter for the mask attribute.

Source:
  - visual/ImageStim.js, line 176

### Methods

#### (protected) _estimateBoundingBox()

Estimate the bounding box.

Source:
  - visual/ImageStim.js, line 226

#### (protected) _estimateBoundingBox()

Estimate the bounding box.

Source:
  - visual/MovieStim.js, line 314