mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 15:25:07 +01:00
Changelog entry and credit for #1385
This commit is contained in:
@@ -10,8 +10,8 @@ const is = require('./is');
|
||||
* If an angle is provided, it is converted to a valid positive degree rotation.
|
||||
* For example, `-450` will produce a 270deg rotation.
|
||||
*
|
||||
* If an angle that is not a multiple of 90 is provided, the color of the
|
||||
* background color can be provided with the `background` option.
|
||||
* When rotating by an angle other than a multiple of 90,
|
||||
* the background colour can be provided with the `background` option.
|
||||
*
|
||||
* If no angle is provided, it is determined from the EXIF data.
|
||||
* Mirroring is supported and may infer the use of a flip operation.
|
||||
@@ -32,7 +32,7 @@ const is = require('./is');
|
||||
* });
|
||||
* readableStream.pipe(pipeline);
|
||||
*
|
||||
* @param {Number} [angle=auto] angle of rotation, must be a multiple of 90.
|
||||
* @param {Number} [angle=auto] angle of rotation.
|
||||
* @param {Object} [options] - if present, is an Object with optional attributes.
|
||||
* @param {String|Object} [options.background="#000000"] parsed by the [color](https://www.npmjs.org/package/color) module to extract values for red, green, blue and alpha.
|
||||
* @returns {Sharp}
|
||||
@@ -55,7 +55,7 @@ function rotate (angle, options) {
|
||||
];
|
||||
}
|
||||
} else {
|
||||
throw new Error('Unsupported angle: angle must be a number.');
|
||||
throw new Error('Unsupported angle: must be a number.');
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user