Class jls.util.Image

This class represents an image
Defined in: Image.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
jls.util.Image(width, height, colorSpace, components, orientation)
Creates an image.
Method Summary
Method Attributes Method Name and Description
 
componentMatrix(matrix, delta)
Applies a matrix on the pixel components of this image.
 
componentSwap(indexes)
Swap the per pixel components depending on the indexes provided.
 
convolve(kernel, componentStart, componentStop)
Applies kernel based convolution on this image.
 
Returns a duplicate of this image.
 
Returns the image buffer.
 
Returns the image height.
 
Returns the image orientation.
 
Returns the image width.
<static>  
jls.util.Image.readBMP(input)
Reads a BMP.
<static>  
jls.util.Image.readJPEG(input, colorSpace, gamma, scaleCalculator)
Reads a JPEG.
 
subsample(width, height)
Returns a subsample of this image.
<static>  
jls.util.Image.writeJPEG(img, output, quality)
Writes a JPEG.
Class Detail
jls.util.Image(width, height, colorSpace, components, orientation)
Creates an image.
Parameters:
{Number} width
The image width.
{Number} height
The image height.
{Number} colorSpace Optional
The color space.
{Number} components Optional
The component count per pixel.
{Number} orientation Optional
The image orientation.
Method Detail
componentMatrix(matrix, delta)
Applies a matrix on the pixel components of this image.
Parameters:
{Array} matrix
The matrix to use.
{Array} delta Optional
The delta to use.

componentSwap(indexes)
Swap the per pixel components depending on the indexes provided.
Parameters:
{Array} indexes Optional
The new indexes.

convolve(kernel, componentStart, componentStop)
Applies kernel based convolution on this image.
Parameters:
{Array} kernel
The kernel to use.
{Number} componentStart Optional
The first component to apply convolution.
{Number} componentStop Optional
The last component to apply convolution.

{jls.util.Image} duplicate()
Returns a duplicate of this image.
Returns:
{jls.util.Image} The duplicate image.

{jls.lang.Buffer} getBuffer()
Returns the image buffer.
Returns:
{jls.lang.Buffer} The image buffer.

{Number} getHeight()
Returns the image height.
Returns:
{Number} The image height.

{Number} getOrientation()
Returns the image orientation.
Returns:
{Number} The image orientation.

{Number} getWidth()
Returns the image width.
Returns:
{Number} The image width.

<static> {jls.util.Image} jls.util.Image.readBMP(input)
Reads a BMP.
Parameters:
{jls.io.FileInputStream} input
The input to read the image.
Returns:
{jls.util.Image} The image.

<static> {jls.util.Image} jls.util.Image.readJPEG(input, colorSpace, gamma, scaleCalculator)
Reads a JPEG.
Parameters:
{jls.io.FileInputStream} input
The input to read the image.
{Number} colorSpace Optional
The output color space.
{Number} gamma Optional
The gamma.
{Function} scaleCalculator Optional
A callback to calculate the scale depending on the image dimension.
Returns:
{jls.util.Image} The image.

{jls.util.Image} subsample(width, height)
Returns a subsample of this image.
Parameters:
{Number} width
The width of the subsample image.
{Number} height
The height of the subsample image.
Returns:
{jls.util.Image} The subsample image.

<static> jls.util.Image.writeJPEG(img, output, quality)
Writes a JPEG.
Parameters:
{jls.util.Image} img
The image to write.
{jls.io.FileOutputStream} output
The output to write the image.
quality

Documentation generated by JsDoc Toolkit 2.3.2 on Fri Apr 29 2011 23:07:07 GMT+0200 (CEST)