mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 18:40:16 +02:00
Changelog entry and credit for #1385
This commit is contained in:
parent
796738da65
commit
6236e4b97d
@ -8,8 +8,8 @@ or auto-orient based on the EXIF `Orientation` tag.
|
|||||||
If an angle is provided, it is converted to a valid positive degree rotation.
|
If an angle is provided, it is converted to a valid positive degree rotation.
|
||||||
For example, `-450` will produce a 270deg 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
|
When rotating by an angle other than a multiple of 90,
|
||||||
background color can be provided with the `background` option.
|
the background colour can be provided with the `background` option.
|
||||||
|
|
||||||
If no angle is provided, it is determined from the EXIF data.
|
If no angle is provided, it is determined from the EXIF data.
|
||||||
Mirroring is supported and may infer the use of a flip operation.
|
Mirroring is supported and may infer the use of a flip operation.
|
||||||
@ -21,7 +21,7 @@ for example `rotate(x).extract(y)` will produce a different result to `extract(y
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
- `angle` **[Number][1]** angle of rotation, must be a multiple of 90. (optional, default `auto`)
|
- `angle` **[Number][1]** angle of rotation. (optional, default `auto`)
|
||||||
- `options` **[Object][2]?** if present, is an Object with optional attributes.
|
- `options` **[Object][2]?** if present, is an Object with optional attributes.
|
||||||
- `options.background` **([String][3] \| [Object][2])** parsed by the [color][4] module to extract values for red, green, blue and alpha. (optional, default `"#000000"`)
|
- `options.background` **([String][3] \| [Object][2])** parsed by the [color][4] module to extract values for red, green, blue and alpha. (optional, default `"#000000"`)
|
||||||
|
|
||||||
|
@ -15,6 +15,10 @@ Requires libvips v8.7.0.
|
|||||||
* Add experimental prebuilt binaries for musl-based Linux.
|
* Add experimental prebuilt binaries for musl-based Linux.
|
||||||
[#1379](https://github.com/lovell/sharp/issues/1379)
|
[#1379](https://github.com/lovell/sharp/issues/1379)
|
||||||
|
|
||||||
|
* Add support for arbitrary rotation angle via vips_rotate.
|
||||||
|
[#1385](https://github.com/lovell/sharp/pull/1385)
|
||||||
|
[@freezy](https://github.com/freezy)
|
||||||
|
|
||||||
### v0.20 - "*prebuild*"
|
### v0.20 - "*prebuild*"
|
||||||
|
|
||||||
Requires libvips v8.6.1.
|
Requires libvips v8.6.1.
|
||||||
|
@ -118,6 +118,7 @@ the help and code contributions of the following people:
|
|||||||
* [Alun Davies](https://github.com/alundavies)
|
* [Alun Davies](https://github.com/alundavies)
|
||||||
* [Aidan Hoolachan](https://github.com/ajhool)
|
* [Aidan Hoolachan](https://github.com/ajhool)
|
||||||
* [Axel Eirola](https://github.com/aeirola)
|
* [Axel Eirola](https://github.com/aeirola)
|
||||||
|
* [Freezy](https://github.com/freezy)
|
||||||
|
|
||||||
Thank you!
|
Thank you!
|
||||||
|
|
||||||
|
@ -10,8 +10,8 @@ const is = require('./is');
|
|||||||
* If an angle is provided, it is converted to a valid positive degree rotation.
|
* If an angle is provided, it is converted to a valid positive degree rotation.
|
||||||
* For example, `-450` will produce a 270deg 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
|
* When rotating by an angle other than a multiple of 90,
|
||||||
* background color can be provided with the `background` option.
|
* the background colour can be provided with the `background` option.
|
||||||
*
|
*
|
||||||
* If no angle is provided, it is determined from the EXIF data.
|
* If no angle is provided, it is determined from the EXIF data.
|
||||||
* Mirroring is supported and may infer the use of a flip operation.
|
* Mirroring is supported and may infer the use of a flip operation.
|
||||||
@ -32,7 +32,7 @@ const is = require('./is');
|
|||||||
* });
|
* });
|
||||||
* readableStream.pipe(pipeline);
|
* 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 {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.
|
* @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}
|
* @returns {Sharp}
|
||||||
@ -55,7 +55,7 @@ function rotate (angle, options) {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new Error('Unsupported angle: angle must be a number.');
|
throw new Error('Unsupported angle: must be a number.');
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,8 @@
|
|||||||
"Sylvain Dumont <sylvain.dumont35@gmail.com>",
|
"Sylvain Dumont <sylvain.dumont35@gmail.com>",
|
||||||
"Alun Davies <alun.owain.davies@googlemail.com>",
|
"Alun Davies <alun.owain.davies@googlemail.com>",
|
||||||
"Aidan Hoolachan <ajhoolachan21@gmail.com>",
|
"Aidan Hoolachan <ajhoolachan21@gmail.com>",
|
||||||
"Axel Eirola <axel.eirola@iki.fi>"
|
"Axel Eirola <axel.eirola@iki.fi>",
|
||||||
|
"Freezy <freezy@xbmc.org>"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"install": "(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)",
|
"install": "(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user