mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
Update links to libvips, now in its own GitHub org
This commit is contained in:
parent
71755b69e4
commit
2ce166ab0a
@ -14,7 +14,7 @@ New bugs are assigned a `triage` label whilst under investigation.
|
|||||||
|
|
||||||
If a [similar request](https://github.com/lovell/sharp/labels/enhancement) exists, it's probably fastest to add a comment to it about your requirement.
|
If a [similar request](https://github.com/lovell/sharp/labels/enhancement) exists, it's probably fastest to add a comment to it about your requirement.
|
||||||
|
|
||||||
Implementation is usually straightforward if _libvips_ [already supports](https://jcupitt.github.io/libvips/API/current/) the feature you need.
|
Implementation is usually straightforward if _libvips_ [already supports](https://libvips.github.io/libvips/API/current/) the feature you need.
|
||||||
|
|
||||||
## Submit a Pull Request to fix a bug
|
## Submit a Pull Request to fix a bug
|
||||||
|
|
||||||
|
@ -94,4 +94,4 @@ Returns **Sharp**
|
|||||||
|
|
||||||
[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
|
[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
|
||||||
|
|
||||||
[6]: https://github.com/jcupitt/libvips/blob/master/libvips/iofuncs/enumtypes.c#L568
|
[6]: https://github.com/libvips/libvips/blob/master/libvips/iofuncs/enumtypes.c#L568
|
||||||
|
@ -126,9 +126,9 @@ The default behaviour _before_ function call is `false`, meaning the libvips acc
|
|||||||
|
|
||||||
Returns **Sharp**
|
Returns **Sharp**
|
||||||
|
|
||||||
[1]: https://github.com/jcupitt/libvips/blob/master/libvips/iofuncs/enumtypes.c#L636
|
[1]: https://github.com/libvips/libvips/blob/master/libvips/iofuncs/enumtypes.c#L636
|
||||||
|
|
||||||
[2]: https://github.com/jcupitt/libvips/blob/master/libvips/iofuncs/enumtypes.c#L672
|
[2]: https://github.com/libvips/libvips/blob/master/libvips/iofuncs/enumtypes.c#L672
|
||||||
|
|
||||||
[3]: https://www.npmjs.com/package/icc
|
[3]: https://www.npmjs.com/package/icc
|
||||||
|
|
||||||
|
@ -77,23 +77,20 @@ Requires libvips to have been compiled with liborc support.
|
|||||||
Improves the performance of `resize`, `blur` and `sharpen` operations
|
Improves the performance of `resize`, `blur` and `sharpen` operations
|
||||||
by taking advantage of the SIMD vector unit of the CPU, e.g. Intel SSE and ARM NEON.
|
by taking advantage of the SIMD vector unit of the CPU, e.g. Intel SSE and ARM NEON.
|
||||||
|
|
||||||
This feature is currently off by default but future versions may reverse this.
|
|
||||||
Versions of liborc prior to 0.4.25 are known to segfault under heavy load.
|
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
- `simd` **[Boolean][2]** (optional, default `false`)
|
- `simd` **[Boolean][2]** (optional, default `true`)
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
const simd = sharp.simd();
|
const simd = sharp.simd();
|
||||||
// simd is `true` if SIMD is currently enabled
|
// simd is `true` if the runtime use of liborc is currently enabled
|
||||||
```
|
```
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
const simd = sharp.simd(true);
|
const simd = sharp.simd(false);
|
||||||
// attempts to enable the use of SIMD, returning true if available
|
// prevent libvips from using liborc at runtime
|
||||||
```
|
```
|
||||||
|
|
||||||
Returns **[Boolean][2]**
|
Returns **[Boolean][2]**
|
||||||
|
@ -37,7 +37,7 @@ and [Leaflet](https://github.com/turban/Leaflet.Zoomify).
|
|||||||
### Fast
|
### Fast
|
||||||
|
|
||||||
This module is powered by the blazingly fast
|
This module is powered by the blazingly fast
|
||||||
[libvips](https://github.com/jcupitt/libvips) image processing library,
|
[libvips](https://github.com/libvips/libvips) image processing library,
|
||||||
originally created in 1989 at Birkbeck College
|
originally created in 1989 at Birkbeck College
|
||||||
and currently maintained by
|
and currently maintained by
|
||||||
[John Cupitt](https://github.com/jcupitt).
|
[John Cupitt](https://github.com/jcupitt).
|
||||||
|
@ -64,7 +64,7 @@ This allows the use of newer versions of libvips with older versions of sharp.
|
|||||||
For 32-bit Intel CPUs and older Linux-based operating systems such as Centos 6,
|
For 32-bit Intel CPUs and older Linux-based operating systems such as Centos 6,
|
||||||
compiling libvips from source is recommended.
|
compiling libvips from source is recommended.
|
||||||
|
|
||||||
[https://jcupitt.github.io/libvips/install.html#building-libvips-from-a-source-tarball](https://jcupitt.github.io/libvips/install.html#building-libvips-from-a-source-tarball)
|
[https://libvips.github.io/libvips/install.html#building-libvips-from-a-source-tarball](https://libvips.github.io/libvips/install.html#building-libvips-from-a-source-tarball)
|
||||||
|
|
||||||
#### Alpine Linux
|
#### Alpine Linux
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ function grayscale (grayscale) {
|
|||||||
/**
|
/**
|
||||||
* Set the output colourspace.
|
* Set the output colourspace.
|
||||||
* By default output image will be web-friendly sRGB, with additional channels interpreted as alpha channels.
|
* By default output image will be web-friendly sRGB, with additional channels interpreted as alpha channels.
|
||||||
* @param {String} [colourspace] - output colourspace e.g. `srgb`, `rgb`, `cmyk`, `lab`, `b-w` [...](https://github.com/jcupitt/libvips/blob/master/libvips/iofuncs/enumtypes.c#L568)
|
* @param {String} [colourspace] - output colourspace e.g. `srgb`, `rgb`, `cmyk`, `lab`, `b-w` [...](https://github.com/libvips/libvips/blob/master/libvips/iofuncs/enumtypes.c#L568)
|
||||||
* @returns {Sharp}
|
* @returns {Sharp}
|
||||||
* @throws {Error} Invalid parameters
|
* @throws {Error} Invalid parameters
|
||||||
*/
|
*/
|
||||||
|
@ -179,9 +179,9 @@ function clone () {
|
|||||||
* - `format`: Name of decoder used to decompress image data e.g. `jpeg`, `png`, `webp`, `gif`, `svg`
|
* - `format`: Name of decoder used to decompress image data e.g. `jpeg`, `png`, `webp`, `gif`, `svg`
|
||||||
* - `width`: Number of pixels wide (EXIF orientation is not taken into consideration)
|
* - `width`: Number of pixels wide (EXIF orientation is not taken into consideration)
|
||||||
* - `height`: Number of pixels high (EXIF orientation is not taken into consideration)
|
* - `height`: Number of pixels high (EXIF orientation is not taken into consideration)
|
||||||
* - `space`: Name of colour space interpretation e.g. `srgb`, `rgb`, `cmyk`, `lab`, `b-w` [...](https://github.com/jcupitt/libvips/blob/master/libvips/iofuncs/enumtypes.c#L636)
|
* - `space`: Name of colour space interpretation e.g. `srgb`, `rgb`, `cmyk`, `lab`, `b-w` [...](https://github.com/libvips/libvips/blob/master/libvips/iofuncs/enumtypes.c#L636)
|
||||||
* - `channels`: Number of bands e.g. `3` for sRGB, `4` for CMYK
|
* - `channels`: Number of bands e.g. `3` for sRGB, `4` for CMYK
|
||||||
* - `depth`: Name of pixel depth format e.g. `uchar`, `char`, `ushort`, `float` [...](https://github.com/jcupitt/libvips/blob/master/libvips/iofuncs/enumtypes.c#L672)
|
* - `depth`: Name of pixel depth format e.g. `uchar`, `char`, `ushort`, `float` [...](https://github.com/libvips/libvips/blob/master/libvips/iofuncs/enumtypes.c#L672)
|
||||||
* - `density`: Number of pixels per inch (DPI), if present
|
* - `density`: Number of pixels per inch (DPI), if present
|
||||||
* - `hasProfile`: Boolean indicating the presence of an embedded ICC profile
|
* - `hasProfile`: Boolean indicating the presence of an embedded ICC profile
|
||||||
* - `hasAlpha`: Boolean indicating the presence of an alpha transparency channel
|
* - `hasAlpha`: Boolean indicating the presence of an alpha transparency channel
|
||||||
|
@ -78,7 +78,7 @@ namespace sharp {
|
|||||||
//
|
//
|
||||||
// References:
|
// References:
|
||||||
// - http://en.wikipedia.org/wiki/Alpha_compositing#Alpha_blending
|
// - http://en.wikipedia.org/wiki/Alpha_compositing#Alpha_blending
|
||||||
// - https://github.com/jcupitt/ruby-vips/issues/28#issuecomment-9014826
|
// - https://github.com/libvips/ruby-vips/issues/28#issuecomment-9014826
|
||||||
//
|
//
|
||||||
// out_a = src_a + dst_a * (1 - src_a)
|
// out_a = src_a + dst_a * (1 - src_a)
|
||||||
// ^^^^^^^^^^^
|
// ^^^^^^^^^^^
|
||||||
|
@ -5,7 +5,7 @@ if ! type valgrind >/dev/null; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
curl -o ./test/leak/libvips.supp https://raw.githubusercontent.com/jcupitt/libvips/master/libvips.supp
|
curl -o ./test/leak/libvips.supp https://raw.githubusercontent.com/libvips/libvips/master/libvips.supp
|
||||||
|
|
||||||
for test in ./test/unit/*.js; do
|
for test in ./test/unit/*.js; do
|
||||||
G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind \
|
G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user