Update documentation for rotation parameter

This commit is contained in:
Florian Rival 2015-12-10 17:38:20 +01:00
parent 5d187494a3
commit acc5cbb090
1 changed files with 6 additions and 2 deletions

View File

@ -103,8 +103,12 @@ ImageResizer.createResizedImage(imageUri, newWidth, newHeight, compressFormat, q
## API ## API
### `promise createResizedImage(path, maxWidth, maxHeight, compressFormat, quality)` ### `promise createResizedImage(path, maxWidth, maxHeight, compressFormat, quality, rotation = 0)`
Open the image at the given path and resize it so that it is less than the specified `maxWidth` and `maxHeight` (i.e: ratio is preserved). `compressFormat` is either `JPEG`, `PNG` (android only) or `WEBP` (android only). Quality is a number between 0 and 100, used for the JPEG compression. Open the image at the given path and resize it so that it is less than the specified `maxWidth` and `maxHeight` (i.e: ratio is preserved). `compressFormat` is either `JPEG`, `PNG` (android only) or `WEBP` (android only).
`quality` is a number between 0 and 100, used for the JPEG compression.
`rotation` is the rotation to apply to the image, in degrees, for android only. On iOS, the resizing is done such that the orientation is always up.
The promise resolves with a string containing the uri of the new file. The promise resolves with a string containing the uri of the new file.