{"_id":"get-pixels-graphite","name":"get-pixels-graphite","dist-tags":{"latest":"4.0.0"},"versions":{"4.0.0":{"name":"get-pixels-graphite","version":"4.0.0","description":"Reads the pixels of an image as an ndarray","main":"dom-pixels.js","directories":{"test":"test"},"dependencies":{"data-uri-to-buffer":"0.0.3","ndarray":"^1.0.13","omggif":"^1.0.5","parse-data-uri":"^0.2.0"},"devDependencies":{"beefy":"^2.1.8","brfs":"^1.2.0","browserify":"^3.44.0","tape":"^2.12.3"},"scripts":{"test":"beefy test/test.js --open  -- -t brfs"},"repository":{"type":"git","url":"git://github.com/ibm-maximo-dev/get-pixels.git"},"keywords":["ndarray","pixel","get","read","pixel","image","png","jpeg","jpg","jpe","gif","decode","buffer","data","parse","dom","node","browserify"],"browser":"dom-pixels.js","author":{"name":"Mikola Lysenko"},"license":"MIT","gitHead":"9ae5505f32e7ef451edbf49846ea0fbc0b081d0d","bugs":{"url":"https://github.com/ibm-maximo-dev/get-pixels/issues"},"homepage":"https://github.com/ibm-maximo-dev/get-pixels#readme","_id":"get-pixels-graphite@4.0.0","_nodeVersion":"16.14.0","_npmVersion":"8.6.0","dist":{"integrity":"sha512-sL08H5Ze43U4IXfE9542zdyP8wDjI0BPXR/5PsS0JTDXJuJKQ42iwhnDCRMcdYQKySwdexLP/nZxY8tBxMSfkg==","shasum":"fccb4ac2bfb9f09e3501b0a00c575753d7e0fcaf","tarball":"https://registry.npmjs.org/get-pixels-graphite/-/get-pixels-graphite-4.0.0.tgz","fileCount":4,"unpackedSize":6678,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIClPFRWfXiliPrJ5tlL4v22r8snBDn2hNMbbnMQ72h5gAiEAwUuh61ibnQiTJiqkNmv14ipC7eN/X5Nn288ghBrT0yE="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkU9ybACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoT7BAAk62teXDuZ5XNqSCDbc4FI0IaE4V/xxEPcU/H436tviD7c/kj\r\nNCuaPe1w7G8sDYvj4XbCsYqBNN38q47A+f3FX5cdaASlLDqwJI+0Sdhl66OZ\r\nMXCcAFNWyYFPOg0yCZ4h02matoleln81mlX3jt2QXMajzYRNHavn1MpYttFA\r\nFZElEQliFIEloltnkqXybDfEvwyr23+E5RlCn6xHiDkVJGt/0HDP4vicYxZr\r\nJdA3WLmQN1uxHHn86tDL++E1f1s0PP8BeQuaDy/Gw6yxc7/p1IyQaU66NenJ\r\n3NOwEGUDpNLgAP5143cIRvxUY5Tt8QPPOKEypIy1TU1ubMJ9TCf1Ms+NIqjY\r\nxEn38txeO+5uGRBE1i3H3Ytbphh1xAlMMBm0+8ZXOzXN7h3uMv/Ri2QdvysR\r\nLAopCPXAb52rKil+eKPftAR1TGJfXmKO6i1oWvuk+vWivo0eusxsCC9IhLlL\r\ngGeNkgDSaVITB2Rx9ZvhPlnljGjbMmd5LPcfIdagsOGu8ClqHXLiUV/nJniT\r\ncJjHY+1+ioWTw08hHayweEA54qT+4Eg2vKpWJoimSGQBfH813sN2KvHuSYdf\r\nBgfIizv3gzX6XhcM4/Yx9JK6kjjgcRR3tIql23/eaAl0o7N3mpNawGGu8ebs\r\nQ+EtYTWTyLWpqUTCc9x/C/wBKfK/pbbA2Lo=\r\n=hTwq\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"maximodev","email":"sls@ca.ibm.com"},"maintainers":[{"name":"maximodev","email":"sls@ca.ibm.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-pixels-graphite_4.0.0_1683217563034_0.028707384181665185"},"_hasShrinkwrap":false}},"time":{"created":"2023-05-04T16:26:03.034Z","4.0.0":"2023-05-04T16:26:03.192Z","modified":"2023-05-04T16:26:03.353Z"},"maintainers":[{"name":"maximodev","email":"sls@ca.ibm.com"}],"description":"Reads the pixels of an image as an ndarray","homepage":"https://github.com/ibm-maximo-dev/get-pixels#readme","keywords":["ndarray","pixel","get","read","pixel","image","png","jpeg","jpg","jpe","gif","decode","buffer","data","parse","dom","node","browserify"],"repository":{"type":"git","url":"git://github.com/ibm-maximo-dev/get-pixels.git"},"author":{"name":"Mikola Lysenko"},"bugs":{"url":"https://github.com/ibm-maximo-dev/get-pixels/issues"},"license":"MIT","readme":"get-pixels\n==========\n\nNOTE: To avoid recent security issues then node-pixels has been removed, so only browser support remains.\n\nGiven a URL/path, grab all the pixels in an image and return the result as an [ndarray](https://github.com/mikolalysenko/ndarray).  Written in 100% JavaScript, works both in browserify and in node.js and has no external native dependencies.\n\nCurrently the following file formats are supported:\n\n* `PNG`\n* `JPEG`\n* `GIF`\n\n\nExample\n=======\n\n```javascript\nvar getPixels = require(\"get-pixels\")\n\ngetPixels(\"lena.png\", function(err, pixels) {\n  if(err) {\n    console.log(\"Bad image path\")\n    return\n  }\n  console.log(\"got pixels\", pixels.shape.slice())\n})\n```\n\nInstall\n=======\n\n    npm install get-pixels\n\n### `require(\"get-pixels\")(url[, type], cb(err, pixels))`\nReads all the pixels from url into an ndarray.\n\n* `url` is the path to the file.  It can be a relative path, an http url, a data url, or an [in-memory Buffer](http://nodejs.org/api/buffer.html).\n* `type` is an optional mime type for the image (required when using a Buffer)\n* `cb(err, pixels)` is a callback which gets triggered once the image is loaded.\n\n**Returns** An ndarray of pixels in raster order having shape equal to `[width, height, channels]`.\n\n**Note** For animated GIFs, a 4D array is returned with shape `[numFrames, width, height, 4]`, where each frame is a slice of the final array.\n\nCredits\n=======\n(c) 2013-2014 Mikola Lysenko. MIT License\n","readmeFilename":"README.md"}