# Class: ImageFilter

## jala.ImageFilter(img)

This class provides several image manipulating methods. Most of this filter library is based on filters created by Janne Kipin� for JAlbum. For more information have a look at http://www.ratol.fi/~jakipina/java/

## Constructor

#### new ImageFilter(img)

Constructs a new ImageFilter object

##### Parameters:

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

`img`

Object

Either

- an instance of helma.image.ImageWrapper
- the path to the image file as String
- an instance of helma.File representing the image file
- an instance of java.io.File representing the image file

Source:
  - jala/code/ImageFilter.js, line 51

### Methods

#### gaussianBlur(radius, amount)

Performs a gaussian blur operation on the image

##### Parameters:

Name | Type | Description
--- | --- | ---
`radius` | Number | The radius
`amount` | Number | The amount

Source:
  - jala/code/ImageFilter.js, line 134

#### getBytes()

Returns the wrapped image as byte array, to use eg. in conjunction with res.writeBinary()

Source:
  - jala/code/ImageFilter.js, line 159

##### Returns:

The wrapped image as byte array

#### getImage()

Returns the image that has been worked on

Source:
  - jala/code/ImageFilter.js, line 145

##### Returns:

An instance of helma.image.ImageWrapper

#### sharpen(amount)

Sharpens the image using a plain sharpening kernel.

##### Parameters:

Name | Type | Description
--- | --- | ---
`amount` | Number | The amount of sharpening to apply

Source:
  - jala/code/ImageFilter.js, line 104

#### unsharpMask(radius, amount)

Performs an unsharp mask operation on the image

##### Parameters:

Name | Type | Description
--- | --- | ---
`radius` | Number | The radius
`amount` | Number | The amount

Source:
  - jala/code/ImageFilter.js, line 124