Socket
Socket
Sign inDemoInstall

sharp

Package Overview
Dependencies
0
Maintainers
1
Versions
153
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.2 to 0.0.3

4

package.json
{
"name": "sharp",
"version": "0.0.2",
"version": "0.0.3",
"main": "index.js",

@@ -18,3 +18,3 @@ "description": "High performance Node.js module to resize JPEG images using the libvips image processing library",

"engines": {
"node": "*"
"node": ">=0.8"
},

@@ -21,0 +21,0 @@ "keywords": [

@@ -1,2 +0,2 @@

# sharp
# sharp

@@ -10,3 +10,3 @@ _adj_

The typical use case for this high performance Node.js module is to convert a large JPEG image to smaller JPEG images of varying dimensions.
The typical use case for this high speed Node.js module is to convert a large JPEG image to smaller JPEG images of varying dimensions.

@@ -17,7 +17,7 @@ It is somewhat opinionated in that it only deals with JPEG images, always obeys the requested dimensions by either cropping or embedding and insists on a mild sharpen of the resulting image.

Speed is typically 4x faster than the imagemagick equivalent.
Performance is 4x-8x faster than the imagemagick equivalent, based mainly on the number of CPU cores available.
## Prerequisites
Requires node-gyp and libvips-dev to build.
Requires Node.js v0.8+, node-gyp and libvips-dev to build.

@@ -43,3 +43,3 @@ sudo npm install -g node-gyp

var sharp = require("sharp");
var sharp = require("sharp");

@@ -71,3 +71,3 @@ ### crop(inputPath, outputPath, width, height, callback)

}
// output.jpg is a 300 pixels wide and 200 pixels high image
// output.jpg is a 200 pixels wide and 300 pixels high image
// containing a scaled version of input.jpg embedded on a white canvas

@@ -86,3 +86,3 @@ });

}
// output.jpg is a 300 pixels wide and 200 pixels high image
// output.jpg is a 200 pixels wide and 300 pixels high image
// containing a scaled version of input.jpg embedded on a black canvas

@@ -94,2 +94,3 @@ });

npm install --dev sharp
npm test

@@ -99,5 +100,25 @@

Using an AMD Athlon quad core CPU with 512KB L2 cache clocked at 3.3GHz with 8GB RAM:
### AMD Athlon 4x core 3.3GHz 512KB L2
* imagemagick x 5.55 ops/sec �0.68% (31 runs sampled)
* sharp x 24.49 ops/sec �6.85% (64 runs sampled)
* imagemagick x 5.55 ops/sec ±0.68% (31 runs sampled)
* sharp x 24.49 ops/sec ±6.85% (64 runs sampled)
### AWS t1.micro
* imagemagick x 1.36 ops/sec ±0.96% (11 runs sampled)
* sharp x 12.42 ops/sec ±5.84% (64 runs sampled)
### AWS m1.medium
* imagemagick x 1.38 ops/sec ±0.45% (11 runs sampled)
* sharp x 12.66 ops/sec ±5.54% (65 runs sampled)
### AWS c1.medium
* imagemagick x 2.10 ops/sec ±0.67% (15 runs sampled)
* sharp x 18.97 ops/sec ±10.54% (52 runs sampled)
### AWS m3.xlarge
* imagemagick x 4.46 ops/sec ±0.33% (26 runs sampled)
* sharp x 28.89 ops/sec ±7.75% (74 runs sampled)

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc