Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gm

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gm - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

examples/extent.js

4

History.md

@@ -0,1 +1,5 @@

## v1.2.0 - 03/30/2012
* added; extent and gravity support [jwarchol]
## v1.1.0 - 03/15/2012

@@ -2,0 +6,0 @@

@@ -269,3 +269,4 @@ // gm - Copyright Aaron Heckmann <aaron.heckmann+github@gmail.com> (MIT Licensed)

, "laplacian"
, "poisson" ];
, "poisson"
];

@@ -347,2 +348,44 @@ // http://www.graphicsmagick.org/GraphicsMagick.html#details-noise

}
// http://www.graphicsmagick.org/GraphicsMagick.html#details-extent
proto.extent = function extent (w, h, options) {
options = options || "";
var geometry;
if (w && h) {
geometry = w + "x" + h + options
} else if (w && !h) {
geometry = w + options
} else if (!w && h) {
geometry = 'x' + h + options
}
// avoid error "geometry does not contain image (unable to crop image)" - gh-17
if (!(this.inputIs('jpg') && ~this._out.indexOf('-crop'))) {
this.in("-size", geometry);
}
return this.out("-extent", geometry);
}
// http://www.graphicsmagick.org/GraphicsMagick.html#details-gravity
// Be sure to use gravity BEFORE extent
proto.gravity = function gravity (type) {
if (!type || !~gravity.types.indexOf(type)) {
type = "NorthWest"; // Documented default.
}
return this.out("-gravity", type);
}
proto.gravity.types = [
"NorthWest"
, "North"
, "NorthEast"
, "West"
, "Center"
, "East"
, "SouthWest"
, "South"
, "SouthEast"
];
};

@@ -349,0 +392,0 @@

15

package.json
{ "name": "gm"
, "description": "Graphics Magick for node."
, "version": "1.1.0"
, "version": "1.2.0"
, "author": "Aaron Heckmann <aaron.heckmann+github@gmail.com>"
, "keywords": ["nodejs", "graphics magick", "graphics", "magick", "image", "graphicsmagick", "imagemagick"]
, "engines": { "node": ">= 0.4.2" }
, "bugs": "http://github.com/aheckmann/gm/issues"
, "bugs": { "url": "http://github.com/aheckmann/gm/issues" }
, "licenses": [{ "type": "MIT", "url": "http://www.opensource.org/licenses/mit-license.php"}]

@@ -13,9 +13,10 @@ , "main": "./index"

{ "name": "Aaron Heckmann", "email": "aaron.heckmann+github@gmail.com" }
, { "name": "Tero Parviainen", "github": "http://github.com/teropa" }
, { "name": "Evan Owen", "github": "http://github.com/kainosnoema" }
, { "name": "Math-", "github": "http://github.com/Math-" }
]
, { "name": "Tero Parviainen", "github": "https://github.com/teropa" }
, { "name": "Evan Owen", "github": "https://github.com/kainosnoema" }
, { "name": "Math-", "github": "https://github.com/Math-" }
, { "name": "Luc Castera", "github": "https://github.com/dambalah" }
, { "name": "Joshua Warchol", "github": "https://github.com/jwarchol" } ]
, "repository": {
"type": "git"
, "url": "http://github.com/aheckmann/gm.git"
, "url": "https://github.com/aheckmann/gm.git"
}

@@ -22,0 +23,0 @@ , "devDependencies": {

@@ -183,2 +183,3 @@ # gm

- [equalize](http://aheckmann.github.com/gm/docs.html#equalize)
- [extent](http://aheckmann.github.com/gm/docs.html#extent)
- [filter](http://aheckmann.github.com/gm/docs.html#filter)

@@ -188,2 +189,3 @@ - [flip](http://aheckmann.github.com/gm/docs.html#flip)

- [gamma](http://aheckmann.github.com/gm/docs.html#gamma)
- [gravity](http://aheckmann.github.com/gm/docs.html#gravity)
- [implode](http://aheckmann.github.com/gm/docs.html#implode)

@@ -190,0 +192,0 @@ - [interlace](http://aheckmann.github.com/gm/docs.html#interlace)

@@ -13,4 +13,14 @@

assert.equal(this.data.color, color)
assert.equal(this.data.Colors['0'], '( 0, 0,255)\t blue');
assert.equal(this.data.Colors['1'], '( 0, 0, 0)\t black');
var blueWorks = this.data.Colors['0'] == '( 0, 0,255)\t blue';
var blackWorks = this.data.Colors['1'] == '( 0, 0, 0)\t black';
if (!blueWorks) {
blueWorks = this.data.Colors['1'] == '( 0, 0,255)\t blue';
blackWorks = this.data.Colors['0'] == '( 0, 0, 0)\t black';
}
assert.ok(blueWorks);
assert.ok(blackWorks);
finish();

@@ -17,0 +27,0 @@

@@ -13,3 +13,3 @@

if (this._options.imageMagick) {
assert.equal(size, '7.79KB');
assert.ok(/7.79KB/.test(size));
} else {

@@ -31,3 +31,3 @@ assert.equal(size, '7.6K');

if (this._options.imageMagick) {
assert.equal(size, '7.79KB');
assert.ok(/7.79KB/.test(size));
} else {

@@ -34,0 +34,0 @@ assert.equal(size, '7.6K');

@@ -15,3 +15,3 @@

assert.equal(d['JPEG-Quality'], 96);
assert.equal(d['Channel Statistics'].Red['Standard Deviation'], '71.70 (0.2812)');
assert.ok(/(0.2812)/.test(d['Channel Statistics'].Red['Standard Deviation']));

@@ -18,0 +18,0 @@ var ex = d['Profile-EXIF'];

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc