{"_id":"imagemagick","_rev":"73-d9e8845b6a927f41c5877192c0a41e8e","name":"imagemagick","description":"A wrapper around the imagemagick cli","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"imagemagick","description":"A wrapper around the imagemagick cli","version":"0.1.0","author":{"name":"Rasmus Andersson"},"licenses":[{"type":"MIT"}],"repository":{"type":"git","url":"http://github.com/rsms/node-imagemagick.git"},"engine":["node >=0.1.90"],"main":"imagemagick","_id":"imagemagick@0.1.0","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/imagemagick/-/imagemagick-0.1.0.tgz","shasum":"e2758e2f01e644c0e3470072bcba913bd2c8c3f1","integrity":"sha512-ya+kU6Mjq51x4i+RX3yqcou3f1kxgZAp9WtN4g+8fS1PPHzDRgXhWmNSUXBRZai7PwRk2949ANyXGgrnBps+qg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzMmBIo4r9YtHBEcDup+uhdjV/q1VeYSlQBgHP9p5waQIgVio3RTFsozvvYXcbwAkRE3i+ABkLHXRCXoBkKm8iBP0="}]},"directories":{}},"0.1.1":{"name":"imagemagick","description":"A wrapper around the imagemagick cli","version":"0.1.1","author":{"name":"Rasmus Andersson"},"licenses":[{"type":"MIT"}],"repository":{"type":"git","url":"http://github.com/rsms/node-imagemagick.git"},"engine":["node >=0.1.90"],"main":"imagemagick","_id":"imagemagick@0.1.1","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/imagemagick/-/imagemagick-0.1.1.tgz","shasum":"bcb49dd594b3d74e4d01dfd28394249abea965bb","integrity":"sha512-LZU3lU+SBUZg56o8RNepoZcPNO9BPDoQoRq4p4NorqddJENqteIyXaeZ4s8HlZ60tmR0rqjYh0CTKD3kz2WXKw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICXUGpdma/XF4tD2eDY3EwAWE4qKj8GUHmbGPmCCe/McAiEAsvGdroU1xaf7ji2Gp9ck3p9luyhEt1Qoqn+6kU+X7eI="}]},"directories":{}},"0.1.2":{"name":"imagemagick","description":"A wrapper around the imagemagick cli","version":"0.1.2","author":{"name":"Rasmus Andersson"},"licenses":[{"type":"MIT"}],"repository":{"type":"git","url":"http://github.com/rsms/node-imagemagick.git"},"engine":["node >=0.1.90"],"main":"imagemagick","_id":"imagemagick@0.1.2","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.2.16","_nodeVersion":"v0.3.8-pre","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"d2c18a7abd21396c926e5e47a2f3a0bb8910b0dd","tarball":"https://registry.npmjs.org/imagemagick/-/imagemagick-0.1.2.tgz","integrity":"sha512-a2IOdwqkGdLsqe7uc5cKW4XhX2A51MBhJH+LIngha7xXeaxVsF7ClDnpsy9xe0m8dlhplRDD70ASqXMzxluf7w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDx1VRimSC+f9YQj/XOnQNYia7Xq/JawuK2fO2SMIGVMQIgCRK2vAxPsepatqCKIZgzQPndCkBEQT/exK8cGshRPWg="}]}},"0.1.3":{"name":"imagemagick","description":"A wrapper around the imagemagick cli","version":"0.1.3","author":{"name":"Rasmus Andersson","email":"http://rsms.me/"},"licenses":["MIT"],"repository":{"type":"git","url":"http://github.com/rsms/node-imagemagick.git"},"engine":["node >=0.6"],"main":"imagemagick","_id":"imagemagick@0.1.3","dist":{"shasum":"7483cea093b4d9f2e2f396857adc8821b537c56a","tarball":"https://registry.npmjs.org/imagemagick/-/imagemagick-0.1.3.tgz","integrity":"sha512-HIwwW10UdwsWcHETt5BPrnEkaJSFLiW1dYDlPYV0EXyj2zJY28iXimPWlZDsOpxVghmF5EuUjYOvJZhZS4Y10g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDSeKdP5YS9Mk+6xCUSpAClcPH6nLPpBZt1DuDAVy1FWAiEAmM25j5aVfsM6Xyxws2LM7Jv6sTJepdWfS2gvvbV2U1I="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"rsms","email":"rasmus@notion.se"},"maintainers":[{"name":"rsms","email":"rasmus@notion.se"}],"directories":{}}},"maintainers":[{"name":"rsms","email":"rasmus@notion.se"},{"name":"yourdeveloper","email":"info@yourdeveloper.net"}],"author":{"name":"Rasmus Andersson","email":"http://rsms.me/"},"repository":{"type":"git","url":"http://github.com/rsms/node-imagemagick.git"},"time":{"modified":"2022-06-19T00:36:45.270Z","created":"2011-02-18T20:47:13.328Z","0.1.0":"2011-02-18T20:47:13.328Z","0.1.1":"2011-02-18T20:47:13.328Z","0.1.2":"2011-02-18T20:47:13.328Z","0.1.3":"2012-12-06T06:58:19.234Z"},"users":{"dodo":true,"fgribreau":true,"noopkat":true,"alanbhamilton":true,"kappuccino":true,"dofy":true,"kiwiobject":true,"fazil":true,"jonyweb":true,"subso":true,"mauperruolo":true,"ronnykj":true,"incendiary":true,"hibrahimsafak":true,"vwal":true,"joaocunha":true,"nukisman":true,"brunocalou":true,"davidbraun":true,"treeofnations":true,"brugnara":true,"jerrywu":true,"nonemoticoner":true,"debearloper":true,"wisecolt":true,"456wyc":true,"sivashanmugam":true,"sasquatch":true,"docluv":true,"leon740727":true,"hexcola":true,"heineiuo":true,"cbetancourt":true,"dudeofawesome":true,"azevedo":true,"adrianorosa":true,"theaklair":true,"papasavva":true,"yesseecity":true,"psbolden":true,"princetoad":true,"alexc1212":true,"joey.dossche":true,"diogocapela":true,"yanghcc":true},"readme":"# node-imagemagick\n\n[Imagemagick](http://www.imagemagick.org/) module for [Node](http://nodejs.org/).\n\nYou can install this module using [npm](http://github.com/isaacs/npm):\n\n    npm install imagemagick\n\nRequires imagemagick CLI tools to be installed. There are numerous ways to install them. For instance, if you're on OS X you can use [Homebrew](http://mxcl.github.com/homebrew/): `brew install imagemagick`.\n\n## Example\n\n```javascript\nvar im = require('imagemagick');\nim.readMetadata('kittens.jpg', function(err, metadata){\n  if (err) throw err;\n  console.log('Shot at '+metadata.exif.dateTimeOriginal);\n})\n// -> Shot at Tue, 06 Feb 2007 21:13:54 GMT\n```\n\n## API\n\n### convert.path\n\nPath to the `convert` program. Defaults to `\"convert\"`.\n\n### identify.path\n\nPath to the `identify` program. Defaults to `\"identify\"`.\n\n### identify(path, callback(err, features))\n\nIdentify file at `path` and return an object `features`.\n\nExample:\n\n```javascript\nim.identify('kittens.jpg', function(err, features){\n  if (err) throw err;\n  console.log(features);\n  // { format: 'JPEG', width: 3904, height: 2622, depth: 8 }\n});\n```\n\n### identify(args, callback(err, output))\n\nCustom identification where `args` is an array of arguments. The result is returned as a raw string to `output`.\n\nExample:\n\n```javascript\nim.identify(['-format', '%wx%h', 'kittens.jpg'], function(err, output){\n  if (err) throw err;\n  console.log('dimension: '+output);\n  // dimension: 3904x2622\n});\n```\n\n### readMetadata(path, callback(err, metadata))\n\nRead metadata (i.e. exif) in `path` and return an object `metadata`. Modelled on top of `identify`.\n\nExample:\n\n```javascript\nim.readMetadata('kittens.jpg', function(err, metadata){\n  if (err) throw err;\n  console.log('Shot at '+metadata.exif.dateTimeOriginal);\n  // -> Shot at Tue, 06 Feb 2007 21:13:54 GMT\n});\n```\n\n### convert(args, callback(err, stdout, stderr))\n\nRaw interface to `convert` passing arguments in the array `args`.\n\nExample:\n\n```javascript\nim.convert(['kittens.jpg', '-resize', '25x120', 'kittens-small.jpg'], \nfunction(err, stdout){\n  if (err) throw err;\n  console.log('stdout:', stdout);\n});\n```\n\n### resize(options, callback(err, stdout, stderr))\n\nConvenience function for resizing an image, modelled on top of `convert`.\n\nThe `options` argument have the following default values:\n\n```javascript\n{\n  srcPath: undefined,\n  srcData: null,\n  srcFormat: null,\n  dstPath: undefined,\n  quality: 0.8,\n  format: 'jpg',\n  progressive: false,\n  width: 0,\n  height: 0,\n  strip: true,\n  filter: 'Lagrange',\n  sharpening: 0.2,\n  customArgs: []\n}\n```\n\nsrcPath, dstPath and (at least one of) width and height are required. The rest is optional.\n\nExample:\n\n```javascript\nim.resize({\n  srcPath: 'kittens.jpg',\n  dstPath: 'kittens-small.jpg',\n  width:   256\n}, function(err, stdout, stderr){\n  if (err) throw err;\n  console.log('resized kittens.jpg to fit within 256x256px');\n});\n```\n\nExample with stdin/stdout:\n\n```javascript\nvar fs = require('fs');\nim.resize({\n  srcData: fs.readFileSync('kittens.jpg', 'binary'),\n  width:   256\n}, function(err, stdout, stderr){\n  if (err) throw err\n  fs.writeFileSync('kittens-resized.jpg', stdout, 'binary');\n  console.log('resized kittens.jpg to fit within 256x256px')\n});\n```\n\n### crop(options, callback) ###\nConvenience function for resizing and cropping an image. _crop_ uses the resize method, so _options_ and _callback_ are the same. _crop_ uses _options.srcPath_, so make sure you set it :) Using only _options.width_ or _options.height_ will create a square dimensioned image.  Gravity can also be specified, it defaults to Center.   Available gravity options are [NorthWest, North, NorthEast, West, Center, East, SouthWest, South, SouthEast]\n\nExample:\n\n```javascript\nim.crop({\n  srcPath: path,\n  dstPath: 'cropped.jpg',\n  width: 800,\n  height: 600,\n  quality: 1,\n  gravity: \"North\"\n}, function(err, stdout, stderr){\n  // foo\n});\n```\n\n## License (MIT)\n\nCopyright (c) 2010-2012 Rasmus Andersson <http://hunch.se/>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","readmeFilename":""}