mirror of
https://github.com/lovell/sharp.git
synced 2025-07-13 04:20:12 +02:00
Changelog, credit and doc tidy for improved threshold operation
This commit is contained in:
parent
91e1ed1314
commit
ba5a8b44ed
@ -393,11 +393,11 @@ When a `sigma` is provided, performs a slower, more accurate sharpen of the L ch
|
||||
|
||||
#### threshold([threshold], [options])
|
||||
|
||||
Converts all pixels in the image to greyscale white or black. Any pixel greather-than-or-equal-to the threshold (0..255) will be white. All others will be black.
|
||||
Any pixel value greather than or equal to the threshold value will be set to 255, otherwise it will be set to 0.
|
||||
By default, the image will be converted to single channel greyscale before thresholding.
|
||||
|
||||
* `threshold`, if present, is a Number, representing the level above which pixels will be forced to white.
|
||||
|
||||
* `options`, an options object that may contain a boolean `grayscale` or `greyscale`. When `grayscale` is `true`, `threshold` returns a black and white image, and when `false` a color image with each channel thresholded independently. The default is `grayscale: true` when omitted.
|
||||
* `threshold`, if present, is a Number between 0 and 255, representing the level at which the threshold will be applied. The default threshold is 128.
|
||||
* `options`, if present, is an Object containing a Boolean `greyscale` (or `grayscale`). When `false` each channel will have the threshold applied independently.
|
||||
|
||||
#### gamma([gamma])
|
||||
|
||||
|
@ -30,6 +30,10 @@ Requires libvips v8.3.1
|
||||
[#456](https://github.com/lovell/sharp/pull/456)
|
||||
[@kapouer](https://github.com/kapouer)
|
||||
|
||||
* Add greyscale option to threshold operation for colourspace conversion control.
|
||||
[#480](https://github.com/lovell/sharp/pull/480)
|
||||
[@mhirsch](https://github.com/mhirsch)
|
||||
|
||||
* Ensure ICC profiles are licenced for distribution.
|
||||
[#486](https://github.com/lovell/sharp/issues/486)
|
||||
[@kapouer](https://github.com/kapouer)
|
||||
|
@ -94,6 +94,8 @@ the help and code contributions of the following people:
|
||||
* [Samy Al Zahrani](https://github.com/salzhrani)
|
||||
* [Chintan Thakkar](https://github.com/lemnisk8)
|
||||
* [F. Orlando Galashan](https://github.com/frulo)
|
||||
* [Kleis Auke Wolthuizen](https://github.com/kleisauke)
|
||||
* [Matt Hirsch](https://github.com/mhirsch)
|
||||
|
||||
Thank you!
|
||||
|
||||
|
@ -25,7 +25,8 @@
|
||||
"Samy Al Zahrani <samyalzahrany@gmail.com>",
|
||||
"Chintan Thakkar <lemnisk8@gmail.com>",
|
||||
"F. Orlando Galashan <frulo@gmx.de>",
|
||||
"Kleis Auke Wolthuizen <info@kleisauke.nl>"
|
||||
"Kleis Auke Wolthuizen <info@kleisauke.nl>",
|
||||
"Matt Hirsch <mhirsch@media.mit.edu>"
|
||||
],
|
||||
"description": "High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP and TIFF images",
|
||||
"scripts": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user