Home » Documentation » Imager

Imager

Allows for basic manipulation of images such as cropping and scaling.

Constructors

Name Description
Constructor  Initializes a new instance of the Imager class and optionally loads a specified file path into the object.
Arguments:
(void)
(FilePath)
(ThisImage)

Methods

Name Description
Constrain  Constrains the output image to a specific height and width.
Arguments:
(Height, Width)
ConstrainHeight  Constrains the output image to a specific height.
Arguments:
(Height)
ConstrainWidth  Constrains the output image to a specific width.
Arguments:
(Width)
Crop  Crops the output image with a specified height, width and specified X and Y positions or a specifed string anchor.
Arguments:
(Height, Width, Anchor)
(Height, Width, SourceX, SourceY)
FixedSize  Sets a fixed size to the output image with specified height and width.
Arguments:
(Height, Width)
GetCanvas  Returns the canvas object of the image being modified in this instance.
GetHeight  Returns the height of the image.
GetWidth  Returns the width of the image.
Load  Loads an image from a specified file path.
Arguments:
(FilePath)
(ImageObj)
SaveAs  Writes the output image to the specified file path.
Arguments:
(FullPath)
SaveHTTP  Writes the output image to the browser and optionally uses a specified file name.
Arguments:
(void)
(FileName)
ScaleByPercent  Scales the output image with specified integer percent.
Arguments:
(Percent)

Properties

Name Description
BackgroundColor  Gets and sets the hex color expression used in background color of the output image.
ContentType  Gets and sets the content type header that is used when SaveHTTP is executed.
ImageName  Gets and sets the output image name.
OutputImage  Stores the image manipulated in this instance

Notes

Please note  The Imager object written in javascript requires that the canvas element is supported. More information here. 
Are you a robot?
Your Email:
Create a Username:
Create a Password:
Forgot Password?
Validate Text: Captcha