Ti.ImageFactory Module

Description

This module provides a set of image transformation functions.

Getting Started

View the Using Titanium Modules document for instructions on getting started with using this module in your application.

Accessing the Ti.ImageFactory Module

To access this module from JavaScript, you would do the following:

var ImageFactory = require('ti.imagefactory');

Functions

imageWithAlpha

Creates a new image by creating a copy of the given image, adding an alpha channel if it doesn't already have one.

Arguments

imageWithTransparentBorder

Creates a new image by creating a copy of the given image, adding a transparent border of the given size around its edges. The size of the image will be expanded by the specified border size.

Arguments

imageWithRoundedCorner

Creates a new image by creating a copy of the given image with rounded corners.

Arguments

imageAsThumbnail

Creates a new image by creating a copy of the given image that is squared to the thumbnail size.

Arguments

imageAsResized

Creates a new image by creating a copy of the given image that is rescaled to the specified size.

Arguments

imageAsCropped

Creates a new image by creating a copy of the given image that is cropped to the specified bounds.

Arguments

imageTransform

Creates a new image by applying a sequence of transformations to the image.

Arguments

compress

Creates a new image by creating a copy of the given image and applying the specified compression quality.

Arguments

Usage

See example.

Author

Jeff English

Module History

View the change log for this module.

Feedback and Support

Please direct all questions, feedback, and concerns to info@appcelerator.com.

License

Copyright(c) 2010-2011 by Appcelerator, Inc. All Rights Reserved. Please see the LICENSE file included in the distribution for further details.