{"_id":"decode-gif","_rev":"4109180","name":"decode-gif","description":"Decode the frames of a gif.","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"richienb","email":"richiebendall@gmail.com"}],"time":{"modified":"2026-01-23T00:52:45.000Z","created":"2020-05-11T06:06:22.559Z","1.0.1":"2020-07-17T15:55:20.520Z","1.0.0":"2020-05-11T06:40:04.826Z","0.0.0":"2020-05-11T06:06:22.559Z"},"users":{},"author":{"name":"Richie Bendall","email":"richiebendall@gmail.com"},"repository":{"type":"git","url":"https://github.com/Richienb/decode-gif.git"},"versions":{"1.0.1":{"name":"decode-gif","version":"1.0.1","description":"Decode the frames of a gif.","repository":{"type":"git","url":"https://github.com/Richienb/decode-gif.git"},"author":{"name":"Richie Bendall","email":"richiebendall@gmail.com"},"license":"MIT","main":"index.js","engines":{"node":">=10"},"scripts":{"lint":"xo","test":"xo && ava"},"keywords":["gif","decode","array","items"],"dependencies":{"array-range":"^1.0.1","omggif":"^1.0.10"},"devDependencies":{"ava":"^3.10.1","eslint-config-richienb":"^0.4.2","xo":"^0.32.1"},"xo":{"extends":"richienb","overrides":[{"files":"test.js","rules":{"node/no-unsupported-features/node-builtins":0}}]},"licenseText":"MIT License\n\nCopyright (c) 2020 Richie Bendall\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 all\ncopies 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 THE\nSOFTWARE.\n","_id":"decode-gif@1.0.1","dist":{"shasum":"7630bf5b2f2a6d6797c487569cb772646c32752b","size":2237,"noattachment":false,"key":"/decode-gif/-/decode-gif-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/decode-gif/download/decode-gif-1.0.1.tgz"},"maintainers":[{"name":"richienb","email":"richiebendall@gmail.com"}],"_npmUser":{"name":"richienb","email":"richiebendall@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/decode-gif_1.0.1_1595001320346_0.09895735377197457"},"_hasShrinkwrap":false,"publish_time":1595001320520,"_cnpm_publish_time":1595001320520,"_cnpmcore_publish_time":"2021-12-17T13:22:35.726Z"},"1.0.0":{"name":"decode-gif","version":"1.0.0","description":"Decode the frames of a gif.","repository":{"type":"git","url":"https://github.com/Richienb/decode-gif.git"},"author":{"name":"Richie Bendall","email":"richiebendall@gmail.com"},"license":"MIT","main":"index.js","engines":{"node":">=10"},"scripts":{"lint":"xo","test":"xo && ava"},"keywords":["gif","decode","array","items"],"dependencies":{"array-range":"^1.0.1","omggif":"^1.0.10"},"devDependencies":{"ava":"^3.8.1","eslint-config-richienb":"^0.4.2","xo":"^0.30.0"},"resolutions":{"eslint":"^6.8.0"},"xo":{"extends":"richienb"},"licenseText":"MIT License\n\nCopyright (c) 2020 Richie Bendall\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 all\ncopies 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 THE\nSOFTWARE.\n","_id":"decode-gif@1.0.0","dist":{"shasum":"5395d9e8fb50eb4e579a314b2d39d2679fdeb4d4","size":2181,"noattachment":false,"key":"/decode-gif/-/decode-gif-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/decode-gif/download/decode-gif-1.0.0.tgz"},"maintainers":[{"name":"richienb","email":"richiebendall@gmail.com"}],"_npmUser":{"name":"richienb","email":"richiebendall@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/decode-gif_1.0.0_1589179204694_0.04272340127480345"},"_hasShrinkwrap":false,"publish_time":1589179204826,"_cnpm_publish_time":1589179204826,"_cnpmcore_publish_time":"2021-12-17T13:22:35.931Z"},"0.0.0":{"name":"decode-gif","version":"0.0.0","main":"index.js","license":"MIT","_id":"decode-gif@0.0.0","dist":{"shasum":"b83b7af21c97ae3259d0f0dd23ab5b8d34defaa6","size":207,"noattachment":false,"key":"/decode-gif/-/decode-gif-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/decode-gif/download/decode-gif-0.0.0.tgz"},"maintainers":[{"name":"richienb","email":"richiebendall@gmail.com"}],"_npmUser":{"name":"richienb","email":"richiebendall@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/decode-gif_0.0.0_1589177182471_0.5038816389580458"},"_hasShrinkwrap":false,"publish_time":1589177182559,"_cnpm_publish_time":1589177182559,"_cnpmcore_publish_time":"2021-12-17T13:22:36.118Z"}},"readme":"# decode-gif [![Travis CI Build Status](https://img.shields.io/travis/com/Richienb/decode-gif/master.svg?style=for-the-badge)](https://travis-ci.com/Richienb/decode-gif)\n\nDecode the frames of a gif.\n\n[![NPM Badge](https://nodei.co/npm/decode-gif.png)](https://npmjs.com/package/decode-gif)\n\n## Install\n\n```sh\nnpm install decode-gif\n```\n\n## Usage\n\n```js\nconst fs = require(\"fs\");\nconst decodeGif = require(\"decode-gif\");\n\ndecodeGif(fs.readFileSync(\"unicorn.gif\"));\n/*\n{\n  width: 220,\n  height: 165,\n  frames: [\n    { timeCode: 0, data: [Uint8ClampedArray] },\n\t{ timeCode: 10, data: [Uint8ClampedArray] },\n\t...\n  ]\n}\n*/\n```\n\n## API\n\n### decodeGif(data)\n\n#### data\n\nType: `array-like`\n\nThe gif data. Can be anything array-like such as a `Buffer`, `Array` or `Uint8Array`.\n\n#### Return value\n\n##### width\n\nType: `number`\n\nThe width of the gif.\n\n##### height\n\nType: `number`\n\nThe height of the gif.\n\n##### frames\n\nAn array of each frame of the gif.\n\n##### frame.timeCode\n\nThe time code in milliseconds that the frame appears at.\n\n##### frame.data\n\nThe frame data as a `Uint8ClampedArray`.\n","_attachments":{},"license":"MIT"}