mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 18:40:16 +02:00
parent
ce6813329b
commit
f1ad1216ca
@ -83,6 +83,15 @@ The _gettext_ dependency of _libvips_ [can lead](https://github.com/lovell/sharp
|
|||||||
|
|
||||||
brew link gettext --force
|
brew link gettext --force
|
||||||
|
|
||||||
|
### Windows
|
||||||
|
|
||||||
|
Requires x86 32-bit Node.js or io.js (use `iojs.exe` rather than `node.exe`).
|
||||||
|
The WebP format is currently unsupported.
|
||||||
|
|
||||||
|
1. [Download](http://www.vips.ecs.soton.ac.uk/supported/current/win32/) and unzip `vips-dev.x.y.z.zip`.
|
||||||
|
2. Set the `VIPS_HOME` environment variable to the full path of the `vips-dev-x.y.z` directory.
|
||||||
|
3. Add `vips-dev-x.y.z\bin` to `PATH`.
|
||||||
|
|
||||||
### Heroku
|
### Heroku
|
||||||
|
|
||||||
[Alessandro Tagliapietra](https://github.com/alex88) maintains an [Heroku buildpack for libvips](https://github.com/alex88/heroku-buildpack-vips) and its dependencies.
|
[Alessandro Tagliapietra](https://github.com/alex88) maintains an [Heroku buildpack for libvips](https://github.com/alex88/heroku-buildpack-vips) and its dependencies.
|
||||||
|
53
binding.gyp
53
binding.gyp
@ -8,15 +8,50 @@
|
|||||||
'src/resize.cc',
|
'src/resize.cc',
|
||||||
'src/sharp.cc'
|
'src/sharp.cc'
|
||||||
],
|
],
|
||||||
'variables': {
|
'conditions': [
|
||||||
'PKG_CONFIG_PATH': '<!(which brew >/dev/null 2>&1 && eval $(brew --env) && echo $PKG_CONFIG_LIBDIR || true):$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig'
|
['OS=="win"', {
|
||||||
},
|
'library_dirs': [
|
||||||
'libraries': [
|
'$(VIPS_HOME)/lib'
|
||||||
'<!(PKG_CONFIG_PATH="<(PKG_CONFIG_PATH)" pkg-config --libs vips)'
|
],
|
||||||
],
|
'libraries': [
|
||||||
'include_dirs': [
|
'libvips.dll.a',
|
||||||
'<!(PKG_CONFIG_PATH="<(PKG_CONFIG_PATH)" pkg-config --cflags vips glib-2.0)',
|
'glib-2.0.lib',
|
||||||
'<!(node -e "require(\'nan\')")'
|
'gobject-2.0.lib',
|
||||||
|
'gthread-2.0.lib',
|
||||||
|
'gmodule-2.0.lib',
|
||||||
|
'liblcms2.dll.a',
|
||||||
|
'libxml2.lib',
|
||||||
|
'intl.lib',
|
||||||
|
'libjpeg.dll.a',
|
||||||
|
'libexif.dll.a',
|
||||||
|
'libpng.lib',
|
||||||
|
'libtiff.dll.a',
|
||||||
|
'libMagickWand-6.Q16.dll.a',
|
||||||
|
'libMagickCore-6.Q16.dll.a',
|
||||||
|
'pango-1.0.lib',
|
||||||
|
'pangoft2-1.0.lib',
|
||||||
|
'libgsf-1.dll.a',
|
||||||
|
'libopenslide.dll.a',
|
||||||
|
'libfftw3.dll.a'
|
||||||
|
],
|
||||||
|
'include_dirs': [
|
||||||
|
'$(VIPS_HOME)/include',
|
||||||
|
'$(VIPS_HOME)/include/glib-2.0',
|
||||||
|
'$(VIPS_HOME)/lib/glib-2.0/include',
|
||||||
|
'<!(node -e "require(\'nan\')")'
|
||||||
|
]
|
||||||
|
}, {
|
||||||
|
'variables': {
|
||||||
|
'PKG_CONFIG_PATH': '<!(which brew >/dev/null 2>&1 && eval $(brew --env) && echo $PKG_CONFIG_LIBDIR || true):$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig'
|
||||||
|
},
|
||||||
|
'libraries': [
|
||||||
|
'<!(PKG_CONFIG_PATH="<(PKG_CONFIG_PATH)" pkg-config --libs vips)'
|
||||||
|
],
|
||||||
|
'include_dirs': [
|
||||||
|
'<!(PKG_CONFIG_PATH="<(PKG_CONFIG_PATH)" pkg-config --cflags vips glib-2.0)',
|
||||||
|
'<!(node -e "require(\'nan\')")'
|
||||||
|
]
|
||||||
|
}]
|
||||||
],
|
],
|
||||||
'cflags_cc': [
|
'cflags_cc': [
|
||||||
'-std=c++0x',
|
'-std=c++0x',
|
||||||
|
@ -722,9 +722,9 @@ describe('Input/output', function() {
|
|||||||
sharp(fixtures.inputJpg)
|
sharp(fixtures.inputJpg)
|
||||||
.resize(320, 240)
|
.resize(320, 240)
|
||||||
.toBuffer(function(err) {
|
.toBuffer(function(err) {
|
||||||
|
sharp.queue.removeListener('change', queueListener);
|
||||||
if (err) throw err;
|
if (err) throw err;
|
||||||
assert.strictEqual(2, eventCounter);
|
assert.strictEqual(2, eventCounter);
|
||||||
sharp.queue.removeListener('change', queueListener);
|
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user