new ImageTransformer(options)
The ImageTransformer class.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
options |
object | The options
Properties
|
Methods
transform(src, transformations, cb)
Get the tranformed image result.
Parameters:
Name | Type | Description |
---|---|---|
src |
string | The source image path |
transformations |
Array.<ImageTransformation> | The transformations to apply. Includes CropTransformation, StretchTransformation and FitTransformation. |
cb |
ImageTransformer~transformCallback | The callback function |
Type Definitions
transformCallback(err, imageInfo, image)
Parameters:
Name | Type | Description |
---|---|---|
err |
Exception | The exception object |
imageInfo |
object | The image info |
image |
Image | The image |