Giter Site home page Giter Site logo

lovell / sharp Goto Github PK

View Code? Open in Web Editor NEW
28.0K 232.0 1.3K 47.07 MB

High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, AVIF and TIFF images. Uses the libvips library.

Home Page: https://sharp.pixelplumbing.com

License: Apache License 2.0

Python 1.15% JavaScript 76.37% C++ 20.14% Shell 0.12% C 0.07% Dockerfile 0.13% TypeScript 2.02%
javascript webp image-processing jpeg png nodejs tiff svg libvips exif

sharp's Introduction

sharp

sharp logo

The typical use case for this high speed Node-API module is to convert large images in common formats to smaller, web-friendly JPEG, PNG, WebP, GIF and AVIF images of varying dimensions.

It can be used with all JavaScript runtimes that provide support for Node-API v9, including Node.js (^18.17.0 or >= 20.3.0), Deno and Bun.

Resizing an image is typically 4x-5x faster than using the quickest ImageMagick and GraphicsMagick settings due to its use of libvips.

Colour spaces, embedded ICC profiles and alpha transparency channels are all handled correctly. Lanczos resampling ensures quality is not sacrificed for speed.

As well as image resizing, operations such as rotation, extraction, compositing and gamma correction are available.

Most modern macOS, Windows and Linux systems do not require any additional install or runtime dependencies.

Documentation

Visit sharp.pixelplumbing.com for complete installation instructions, API documentation, benchmark tests and changelog.

Examples

npm install sharp
const sharp = require('sharp');

Callback

sharp(inputBuffer)
  .resize(320, 240)
  .toFile('output.webp', (err, info) => { ... });

Promise

sharp('input.jpg')
  .rotate()
  .resize(200)
  .jpeg({ mozjpeg: true })
  .toBuffer()
  .then( data => { ... })
  .catch( err => { ... });

Async/await

const semiTransparentRedPng = await sharp({
  create: {
    width: 48,
    height: 48,
    channels: 4,
    background: { r: 255, g: 0, b: 0, alpha: 0.5 }
  }
})
  .png()
  .toBuffer();

Stream

const roundedCorners = Buffer.from(
  '<svg><rect x="0" y="0" width="200" height="200" rx="50" ry="50"/></svg>'
);

const roundedCornerResizer =
  sharp()
    .resize(200, 200)
    .composite([{
      input: roundedCorners,
      blend: 'dest-in'
    }])
    .png();

readableStream
  .pipe(roundedCornerResizer)
  .pipe(writableStream);

Contributing

A guide for contributors covers reporting bugs, requesting features and submitting code changes.

Licensing

Copyright 2013 Lovell Fuller and others.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

sharp's People

Contributors

borntraegermarc avatar brandonaaron avatar connormiha avatar daiz avatar felixbuenemann avatar freezy avatar hugo-syn avatar jardakotesovec avatar jonathanong avatar kapouer avatar kleisauke avatar linusu avatar lovell avatar mart-jansink avatar mbklein avatar mcuelenaere avatar mhirsch avatar nstepien avatar papandreou avatar pierreinglebert avatar ppaskaris avatar raboliotlegris avatar rexxars avatar rnanwani avatar roryrjb avatar rreverser avatar salzhrani avatar wjordan avatar woolite64 avatar yvesbos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sharp's Issues

Add option not to enlarge images

Possible options:

sharp('file.jpg', {enlarge: false}).resize(100, 100)
sharp('file.jpg').resize(100, 100).enlarge(false)
sharp('file.jpg').resize(100, 100).noEnlarge()

Say I want to resize 1000s of images to fit 100x100 but some of those are already 50x50. Than it would be nice not to enlarge those tiny images (quality degradation) and return the same input image in a callback.

streams

Does the whole buffer have to load into run time memory or is it possible with the underlying C library to implementing a true streaming api, so that a file can be streamed from disk, through sharp stream to network socket or file read stream or whatever else.

ref: http://nodejs.org/api/stream.html

Neither graphicks magik, nor image magik wrappers are capable of streams - theres one module (gm I think) that has a stream api, but its faked somewhat, the module still has to load the full image into memory regardless. So a true streaming interface for sharp would be a massive usp

Installation fails on Ubuntu trusty

I tried to follow the Installation instructions, however I'm not getting much luck and I'm unsure if I'm the one doing something wrong.

You can see how I'm setting up the Ubuntu environment by checking this gist, I'm using vagrant to create an Ubuntu machine so I've included the Vagrantfile just in case you want to replicate it.

You can find the npm_debug.log on the same gist.

If you need any extra info please ask, and i'm sorry for not providing much information, but i'm a little newbie with image manipulation libraries, so I'm not sure where to start to provide more info.

Can't install with npm install sharp

[email protected] install /private/tmp/node_modules/sharp
node-gyp rebuild

/bin/sh: pkg-config: command not found
gyp: Call to 'PKG_CONFIG_PATH="/usr/local/Library/ENV/pkgconfig/10.8:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig" pkg-config --libs vips' returned exit status 127.
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/src/node-v0.10.26-darwin-x64/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Darwin 13.2.0
gyp ERR! command "node" "/usr/local/src/node-v0.10.26-darwin-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /private/tmp/node_modules/sharp
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the sharp package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls sharp
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 13.2.0
npm ERR! command "/usr/local/node/bin/node" "/usr/local/node/bin/npm" "install" "sharp"
npm ERR! cwd /private/tmp
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /private/tmp/npm-debug.log
npm ERR! not ok code 0

Memory leak

I ran a batch using sharp on ~1000 files and it ended using >300MB ram.

I created a little gist to "demonstrate" it, it download a large image and creates 800 thumbs at different sizes.
On my mbp, when finished, it takes 120MB ram (more if i increase the number of generated thumbs).

Feature request: support EXIF mirroring (was: Auto-orientation only works in some cases)

Hi Lovell,

I recently found I needed auto-orientation and was pleasantly surprised to see it now implemented in Sharp.

I ran into the following blog where the author uses a sample set of images (with various exif parameters) and show the state of "Exif orientation" on the internet.
http://www.daveperrett.com/articles/2012/07/28/exif-orientation-handling-is-a-ghetto/

His sample set is available on github:
https://github.com/recurser/exif-orientation-examples

I ran through this sample set using sharp with the autorotate() fag turned on. Only about half the images auto-rotated properly. I'm not sure if this is a bug or if I am simply doing something wrong. Feel free to let me know your thoughts and if your able to replicate this on your end.

Thanks,

  • Kevin

PKG_CONFIG_PATH and libxml-2.0.pc

I'm getting the following compilation error on Mavericks:

$ npm install sharp

> [email protected] install /Users/onetom/XXX/node_modules/sharp
> node-gyp rebuild

Package libxml-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libxml-2.0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libxml-2.0', required by 'vips', not found
gyp: Call to 'PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" pkg-config --libs vips' returned exit status 1. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/Cellar/node/0.10.21/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:424:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Darwin 13.1.0
gyp ERR! command "node" "/usr/local/Cellar/node/0.10.21/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/onetom/XXX/node_modules/sharp
gyp ERR! node -v v0.10.21
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0

I had a similar issue with the node-vips library, which I've ended up fixing like this:

↪  cat node_modules/vips/binding.gyp
{
    'targets': [{
        'target_name': 'vips',
        'sources': [
            'src/node-vips.cc',
            'src/transform.cc'
        ],
        'conditions': [
          ['OS=="mac"', {
            'libraries': [
                '<!@(PKG_CONFIG_PATH=/usr/local/Library/ENV/pkgconfig/10.8 pkg-config --libs glib-2.0 vips exiv2)',
            ],
            'include_dirs': [
              '/usr/local/include/glib-2.0',
              '/usr/local/include/vips',
              '/usr/local/include/exiv2',
              '/usr/local/lib/glib-2.0/include'
            ]
          }, {
            'libraries': [
                '<!@(PKG_CONFIG_PATH="/usr/lib/pkgconfig" pkg-config --libs glib-2.0 vips exiv2)'
            ],
            'include_dirs': [
                '/usr/include/glib-2.0',
                '/usr/lib/glib-2.0/include',
                '/usr/lib/x86_64-linux-gnu/glib-2.0/include'
            ],
          }]
        ],
        'cflags': [ '-fexceptions' ],
        'cflags_cc': [ '-fexceptions' ]
    }]
}

I'm very curious how could it compile without tweaks on others' systems.
brew install homebrew/science/vips alone is clearly not enough.

Error in `node': corrupted double-linked list

I'm running a batch of node services that are cropping images on demand with sharp. Every once in a while one of them will get this error which requires a hard restart (I'm running the services with forever but the error doesn't seem to be raised at the correct "level" for forever to handle it). I haven't been able to track it down to sharp specifically, perhaps it has something more to do with libvips, but I'm starting at the top of the chain.

Stack trace here:
https://gist.github.com/spro/8839678

Feature request: support image rotation

If libvips supports rotation it would be great to be able to rotate images with Sharp so that images can be transformed efficiently without having to encode/decode multiple times. Basic 90/180/270 degree rotation would be sufficient (and maybe mirroring) to accomodate EXIF orientations.

Jpeg Image Quality

Hi Lovell - I really love this package. Unlike opencv which crashes from memory constraints this package is very low in memory usage and blazing fast.

One thing I would like to be able to do is change the quality of my images. I couldn't find documentation or any inline code constant on the current jpeg quality setting nor could I find a way to set it. In many of the other packages I've used you can pass in a value between 0 and 100.

Thanks,

Kevin

.resize() with .max() still crops the image

Sorry to bother you again, dunno - maybe its something on my side. Given an image - for example this one

image

I would like to resize it to max 100x100 which means the resulting image should fit within those bounds while maintaing the aspect ratio (no cropping). Here's my call:

sharp(file).resize(100, 100).max().toBuffer(function(err, buffer) {
});

And the image I get is this one (resized and cropped to 57x100):

image

Shouldn't sharp simply resize input image to 57x100 without any cropping?

Thanks.

Use Native Abstractions

There are compiler warnings with node v0.11 unstable.

../src/sharp.cc: In function ‘v8::Handle<v8::Value> Resize(const v8::Arguments&)’:
../src/sharp.cc:159:77: warning: ‘static v8::Persistent<S> v8::Persistent<T>::New(v8::Handle<T>) [with T = v8::Function]’ is deprecated (declared at /home/travis/.node-gyp/0.11.3/deps/v8/include/v8.h:5514) [-Wdeprecated-declarations]

Using https://github.com/rvagg/nan should hopefully reduce the impact of V8 changes, e.g. https://github.com/rvagg/node-postgres/commit/6cb167112ef65845dec818e7a888218fbe408483

Buffer issue

I'm using Knox to download an image on S3 and I'm stocking data in a buffer and place it in sharp constructor method.

res.setEncoding('binary');
var output = new Buffer('', 'binary');
res.on('data', function(chunck){
  output.write(chunck);
});
res.on('end', function(){
  callback(output, false);
});
// ...
sharp(rawImg)
  .resize(target.size, target.size)
  .toBuffer(function(err, image){
    if(err){
      console.log(err);
    }
    callback(image);
  });

But I have an error in the callback : Unsupported input file undefined
The buffer is not corrupted : if I output it with buffer.toString() as an express response, the image is displayed.

Do you have any idea guys ?

JPEG to PNG image corruption

Maybe I hit an edge case or maybe I'm just doing something wrong, probably the latter.

This sample of code always results in a corrupted image.
However, not calling one of the sequentialRead or progressive methods fixes the problem.

var sharp = require('sharp');

sharp('firefox.jpg')
    .sequentialRead()
    .progressive()
    .toFile('firefox.png');

example:
firefox.jpgfirefox.png

If I use a similar firefox image but with a geometry of 2048x2048, the above script throws the "scanlines" warning, but the end result is the same.

vips warning: VipsJpeg: read gave 12288 warnings
vips warning: VipsJpeg: Application transferred too many scanlines

I tried to use the identify from ImageMagick and pngcheck to detect corrupted images but, as far as those tools can tell, the resulting image is a valid png image.

I'm currently using:

  • node v0.10.29
  • sharp 0.5.1
  • vips-7.38.5-Tue May 20 19:11:27 WEST 2014
  • OSX 10.9.3 on a Mac Mini mid 2011, with 2,3Ghz i5 and 8GB 1333 Mhz DDR3

If you need more information, please just ask.
Thanks

Library not found for jpeg

Hi there!
I'm running OS X Mavericks, and I've installed libvips via homebrew.

When I npm install sharp I get the following error:

> [email protected] install /Users/murphy/TheLab/Slimmer/node_modules/sharp
> node-gyp rebuild

  CXX(target) Release/obj.target/sharp/src/sharp.o
  SOLINK_MODULE(target) Release/sharp.node
ld: library not found for -ljpeg
clang: error: linker command failed with exit code 1 (use -v to see invocation)

But I don't know where to start debugging. Any ideas?

Support for Windows

I'd like to be able to use sharp on the Windows platform. Because libvips is available for Windows, I assume that lack of support is mostly in figuring out the build script.

Has this been investigated already? If so, what approaches have already been tried and roadblocks encountered? Knowing what's been tried so far, if anything, will help me or other potential developers come to a working solution quicker.

abort trap error

to be fair, i think this is a node error, like many things:

> sharp('/Users/jong/Downloads/We0opiV.jpg').resize(50).toFile('test.jpg', function (){})
{ options: 
   { width: 50,
     height: -1,
     canvas: 'c',
     angle: 0,
     withoutEnlargement: false,
     sharpen: false,
     progressive: false,
     sequentialRead: false,
     quality: 80,
     compressionLevel: 6,
     output: '__jpeg',
     fileIn: '/Users/jong/Downloads/We0opiV.jpg' } }
> Assertion failed: (enter->IsFunction()), function MakeDomainCallback, file ../src/node.cc, line 1027.
Abort trap: 6

This is when i execute it in the REPL.
OS X 10.9.3
Node 0.11.13

libvips won't compile with given commands on ubuntu 12.04

./configure fails with this message at the end (all else looks ok):

configure: creating ./config.status
config.status: creating vips.pc
config.status: creating vipsCC.pc
config.status: error: cannot find input file: `Makefile.in'

Enable overwriting input file

sharp('file.jpg').resize(100, 100).write('file.jpg', function(err) {
    console.log(err)l;
});

Gives:

VipsJpeg: Empty input file
vips__region_start: start function failed for image temp-1
VipsRegion: valid clipped to nothing
VipsRegion: valid clipped to nothing
VipsRegion: valid clipped to nothing

Any chance to implement file overwriting?

after installing libvips with brew : fatal error: 'vips/vips.h' file not found

Hi couldn't install sharp on OSX 10.9.3. After installing libvips with brew, following the instructions, I get :

> [email protected] install /Users/leyla_nasib/Desktop/abr/backend/node_modules/sharp
> node-gyp rebuild

  CXX(target) Release/obj.target/sharp/src/sharp.o
../src/sharp.cc:6:10: fatal error: 'vips/vips.h' file not found
#include <vips/vips.h>
         ^
1 error generated.

So apparently it doesn't find the library ... but I have no idea how to fix that?

Survey: what are you using 'sharp' for?

I'm truly humbled by the recent surge in support for sharp.

Whilst ⭐ and the trending status they bring are both amazing, thank you, the real measure of open source success is happy users.

I'd love to find out more about how you or your organisation are using (or plan to use) this module.

Feel free to add a comment with details of who you are, what you're doing with it and why you chose it. Alternatively let me know via @lovell on Twitter.

Thank you!

Homebrew pkg-config custom path

Hi, I'm trying to install this module, but getting an error, because Homebrew is setup in a custom folder (I'm using Boxen). Here is my setup:

$ brew --env
HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
MAKEFLAGS: -j4
CMAKE_PREFIX_PATH: /opt/boxen/homebrew
CMAKE_INCLUDE_PATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/libxml2:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/apache2:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
CMAKE_FRAMEWORK_PATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/opt/boxen/homebrew/Library/ENV/pkgconfig/10.9
HOMEBREW_SDKROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
ACLOCAL_PATH: /opt/boxen/homebrew/share/aclocal
PATH: /opt/boxen/homebrew/Library/ENV/4.3:/usr/bin:/bin:/usr/sbin:/sbin

Would it be possible to source brew --env in the binding.gyp file on Mac OS X and use the PKG_CONFIG_LIBDIR?

Fallback on libmagick

For other input formats that jpg, tiff or png, it could fallback on libmagick loader (doesnt support buffer loading).

Gravity based resize/crop

12364-warren-e-burger-quotes
12364-warren-e-burger-quotes222

Can you do resize/crop with specified gravity center with Sharp ?

For example if you have a rectangle image, can you crop a square from the most upper part of the image, not from the center.

Investigate reducing the dependencies to install vips

One of the hardest parts about using Sharp is setting it up. Being able to just say "npm install sharp" would make it easier for a lot of people to try it out.

Currently libvips isn't very easy to set up on an Amazon Linux box, and on Mac OS X it requires brew (there are some instances in which one may wish not to install brew). So if there were an easier way to build vips and it were integrated with Sharp's installation that could help a lot.

Speed up functional test coverage

Currently the benchmark tests/perf.js provides some of the functional test coverage for this module. These tests are intentionally slow, so this task is about moving the functional coverage these benchmark tests provide to the faster "unit" test suite.

This might also be the right time to move to mocha (or similar).

See #52 for background.

Provide a more expressive API

Beg, borrow and steal a small but perfectly formed subset of the methods provided by the gm wrapper around GraphicsMagick.

This will make it a bit easier for people to switch to using the multicore-aware libvips library should it provide the features they need.

Resize error with tiff

I get some issues trying to resize a tiff.
I wrote a little test that fails.

  function(done) {
    sharp(inputTiff).resize(240, 320).write(outputJpg, function(err) {
      if (err) throw err;
      imagemagick.identify(outputJpg, function(err, features) {
        if (err) throw err;
        assert.strictEqual(240, features.width);
        assert.strictEqual(320, features.height);
        done();
      });
    });
  }

npm install sharp fails

$ npm install sharp
npm http GET https://registry.npmjs.org/sharp
npm http 304 https://registry.npmjs.org/sharp
npm http GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/nan

[email protected] install /Users/gabrielbaciu/projects/node-image-processing/node_modules/sharp
node-gyp rebuild

CXX(target) Release/obj.target/sharp/src/sharp.o
../src/sharp.cc:6:10: fatal error: 'vips/vips.h' file not found

include <vips/vips.h>

     ^

1 error generated.
make: *** [Release/obj.target/sharp/src/sharp.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:807:12)
gyp ERR! System Darwin 13.2.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/gabrielbaciu/projects/node-image-processing/node_modules/sharp
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the sharp package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls sharp
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "sharp"
npm ERR! cwd /Users/gabrielbaciu/projects/node-image-processing
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/gabrielbaciu/projects/node-image-processing/npm-debug.log
npm ERR! not ok code 0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.