# Class: image

## image

#### new image(id)

Creates an image object

##### Parameters:

Name | Type | Description
--- | --- | ---
`id` | string | The id of the dom element containing the image

Source:
  - image.js, line 12

### Methods

#### GetAvailHeight()

gets available height (6.14.06)

Source:
  - image.js, line 245

#### GetAvailWidth()

gets available width (6.14.06)

Source:
  - image.js, line 239

#### GetFileInfo()

Returns file_info object that contains information about the displayed image.

Source:
  - image.js, line 59

#### GetImRatio()

Returns the ratio of the available width/height to the original width/height.

Source:
  - image.js, line 52

#### GetNewImage(onload_helper)

Fetches a new image based on the URL string or gets a new one at

##### Parameters:

Name | Type | Description
--- | --- | ---
`onload_helper` | function | pointer to a helper function that is called when the image is loaded. Typically, this will call obj.SetImageDimensions().

Source:
  - image.js, line 39

#### IsFitImage()

Returns true if the image is zoomed to the original (fitted) resolution.

Source:
  - image.js, line 256

#### IsPointVisible()

Returns true if (x,y) is viewable.

Source:
  - image.js, line 261

#### ScaleFrame()

Tells the picture to take up the available space in the browser, if it needs it. 6.29.06

Source:
  - image.js, line 206

#### ScrollbarsOff()

Turn off image scrollbars if zoomed in.

Source:
  - image.js, line 122

#### ScrollbarsOn()

Turn on image scrollbars if zoomed in.

Source:
  - image.js, line 129

#### SetImageDimensions()

Sets the dimensions of the image based on browser setup.

Source:
  - image.js, line 65

#### SetOrigImDims(im)

Retrieves and sets the original image's dimensions (width/height).

##### Parameters:

Name | Type | Description
--- | --- | ---
`im` | image |

Source:
  - image.js, line 232

#### SlideWindow(x, y) → {intarray}

If (x,y) is not in view, then scroll it into view. Return adjusted (x,y) point that takes into account the slide offset.

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | int |
`y` | int |

Source:
  - image.js, line 110

##### Returns:

Type
  intarray

#### Zoom(amt)

Zoom the image given a zoom level (amt) between 0 and inf (or 'fitted').

##### Parameters:

Name | Type | Description
--- | --- | ---
`amt` | float | amount of zoom

Source:
  - image.js, line 138