ImageAlter, v4.0.4

Implements client side Image manipulation

Other Versions

4.0.4, 3.0.2, 3.0.0, 2.1.4, 2.1.3, 2.0.4, 1.2.9

BrowserPlus.ImageAlter.transform({params}, function{}())

Perform a set of transformations on an input image

Test: transform()

Parameters

file: path
The image to transform.
format: string (Optional)
The format of the output image. Default is to output in the same format as the input image. A string, one of: jpg, gif, or png
quality: integer (Optional)
The quality of the output image. From 0-100. Lower qualities result in faster operations and smaller file sizes, at the cost of image quality (default: 75)
actions: list (Optional)
An array of actions to perform. Each action is either a string (i.e. { actions: [ 'solarize' ] }) , or an object with a single property, where the property name is the action to perform, and the property value is the argument (i.e. { actions: [{rotate: 90}] }. Supported actions include: contrast -- adjust the image's contrast, accepts an optional numeric argument between -10 and 10 | blur -- blur (or 'smooth') an image | crop -- select a subset of an image, accepts an array of four floating point numbers: x1,y1,x2,y2 which are between 0.0 and 1.0 and are relative coordinates to the upper left hand corner of the image | despeckle -- reduces the speckle noise in an image while perserving the edges of the original image, accepts no arguments | dither -- Uses the ordered dithering technique of reducing color images to monochrome using positional information to retain as much information as possible. | enhance -- Applies a digital filter that improves the quality of a noisy image, accepts no arguments | equalize -- Applies a histogram equalization to the image. | grayscale -- remove the color from an image, accepts no arguments | greyscale -- an alias for 'grayscale' | negate -- negate the colors of the image, accepts no arguments | noop -- do nothing. may be applied multiple times. still does nothing. | normalize -- Enhances the contrast of a color image by adjusting the pixels color to span the entire range of colors available. | oilpaint -- an effect that will make the image look like an oil painting, accepts no arguments | psychedelic -- trip out an image. takes no arguments. may be applied multiple times. | rotate -- rotate an image by some number of degrees, takes a single numeric argument | scale -- downscale an image preserving aspect ratio. you may provide the integer arguments maxwidth and/or maxheight which limit the image in the specified direction. units are pixels. | sepia -- sepia tone an image. no arguments. | sharpen -- sharpen an image | solarize -- solarize an image. no arguments | swirl -- swirl an image. optionally a numeric argument specifies the degrees to swirl, default is 90 degrees. | unsharpen -- unsharpen an image |