{"_id":"buffer-image-size","_rev":"4-4fb11815e53635c118d8ac09344a80c0","name":"buffer-image-size","dist-tags":{"latest":"0.6.4"},"versions":{"0.6.2":{"name":"buffer-image-size","version":"0.6.2","description":"get dimensions of any image buffer","main":"lib/index.js","files":["bin","lib"],"engines":{"node":">=4.0"},"scripts":{"pretest":"eslint lib specs","test":"nyc mocha specs","coverage":"nyc report --reporter=text-lcov | coveralls"},"repository":{"type":"git","url":"git+https://github.com/evidentpoint/buffer-image-size.git"},"keywords":["image","size","dimensions","resolution","width","height","png","jpeg","bmp","gif","psd","webp","svg","ico","cur"],"author":{"name":"netroy","email":"aditya@netroy.in","url":"http://netroy.in/"},"license":"MIT","devDependencies":{"coveralls":"^3.0.0","eslint":"^4.13.1","expect.js":"^0.3.1","glob":"^7.1.1","mocha":"^4.0.1","nyc":"^11.2.1","sinon":"^4.0.2"},"gitHead":"3815e5e49b50c20e71979cfd08d456f035c963d1","bugs":{"url":"https://github.com/evidentpoint/buffer-image-size/issues"},"homepage":"https://github.com/evidentpoint/buffer-image-size#readme","_id":"buffer-image-size@0.6.2","_npmVersion":"5.6.0","_nodeVersion":"9.6.1","_npmUser":{"name":"jccr","email":"juan.carlos.corona.r@gmail.com"},"dist":{"integrity":"sha512-kW96mibtA/wi0gho/A0uNN8AW+OglQ28z5Nwp8mk5iX8qpudHPIWdQp5NKdgsoO2aUM4tFIZSOpzTEKsdzKDEA==","shasum":"a2ed7787717e5e31049b54ee2e5a6ca4b4cfe68e","tarball":"https://registry.npmjs.org/buffer-image-size/-/buffer-image-size-0.6.2.tgz","fileCount":17,"unpackedSize":16634,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDrQHRLdAjhFNrd1S2Y6bsqRqZGqgkxAwpibvQ42ZJPWAiEA6WS9Lskn1wG13HR79sHhYOLFEfTnL7h1EDEqEDsRFvY="}]},"maintainers":[{"name":"jccr","email":"juan.carlos.corona.r@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/buffer-image-size_0.6.2_1519869397612_0.21518451019497808"},"_hasShrinkwrap":false},"0.6.3":{"name":"buffer-image-size","version":"0.6.3","description":"get dimensions of any image buffer","main":"./lib/index.js","types":"./lib/main.d.ts","files":["bin","lib"],"engines":{"node":">=4.0"},"scripts":{"pretest":"eslint lib specs","test":"nyc mocha specs","coverage":"nyc report --reporter=text-lcov | coveralls"},"repository":{"type":"git","url":"git+https://github.com/evidentpoint/buffer-image-size.git"},"keywords":["image","size","dimensions","resolution","width","height","png","jpeg","bmp","gif","psd","webp","svg","ico","cur"],"author":{"name":"netroy","email":"aditya@netroy.in","url":"http://netroy.in/"},"license":"MIT","dependencies":{"@types/node":"*"},"devDependencies":{"coveralls":"^3.0.0","eslint":"^4.13.1","expect.js":"^0.3.1","glob":"^7.1.1","mocha":"^4.0.1","nyc":"^11.2.1","sinon":"^4.0.2"},"gitHead":"3e9d880827144944083c090cc09c5dd51cadb933","bugs":{"url":"https://github.com/evidentpoint/buffer-image-size/issues"},"homepage":"https://github.com/evidentpoint/buffer-image-size#readme","_id":"buffer-image-size@0.6.3","_npmVersion":"5.6.0","_nodeVersion":"9.6.1","_npmUser":{"name":"jccr","email":"juan.carlos.corona.r@gmail.com"},"dist":{"integrity":"sha512-Jhzo1U/MHyia03P9njVlUgWSM0Qp9B2LPtmptI3hUezXcR1RQqA3etlxBMqxPdQGZPSp5Dg/q0FFb2CFg8tQ5Q==","shasum":"5462b0350e69c23d3c959da944ffa0e91411ff44","tarball":"https://registry.npmjs.org/buffer-image-size/-/buffer-image-size-0.6.3.tgz","fileCount":18,"unpackedSize":17155,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWK2RZqPdqCy4pwtEiatMnJ/UPOxhSYulA9kxkQMpf0gIgdeJj1Z5fvpB+p1M3KOuxL2Gbu9NQH6LoUTOQHJH2nok="}]},"maintainers":[{"name":"jccr","email":"juan.carlos.corona.r@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/buffer-image-size_0.6.3_1519870198261_0.8822944909522064"},"_hasShrinkwrap":false},"0.6.4":{"name":"buffer-image-size","version":"0.6.4","description":"get dimensions of any image buffer","main":"./lib/index.js","types":"./lib/index.d.ts","files":["bin","lib"],"engines":{"node":">=4.0"},"scripts":{"pretest":"eslint lib specs","test":"nyc mocha specs","coverage":"nyc report --reporter=text-lcov | coveralls"},"repository":{"type":"git","url":"git+https://github.com/evidentpoint/buffer-image-size.git"},"keywords":["image","size","dimensions","resolution","width","height","png","jpeg","bmp","gif","psd","webp","svg","ico","cur"],"author":{"name":"netroy","email":"aditya@netroy.in","url":"http://netroy.in/"},"license":"MIT","dependencies":{"@types/node":"*"},"devDependencies":{"coveralls":"^3.0.0","eslint":"^4.13.1","expect.js":"^0.3.1","glob":"^7.1.1","mocha":"^4.0.1","nyc":"^11.2.1","sinon":"^4.0.2"},"gitHead":"92d014e394c05542c320c94c7d7f2b23ad449330","bugs":{"url":"https://github.com/evidentpoint/buffer-image-size/issues"},"homepage":"https://github.com/evidentpoint/buffer-image-size#readme","_id":"buffer-image-size@0.6.4","_npmVersion":"5.6.0","_nodeVersion":"9.6.1","_npmUser":{"name":"jccr","email":"juan.carlos.corona.r@gmail.com"},"dist":{"integrity":"sha512-nEh+kZOPY1w+gcCMobZ6ETUp9WfibndnosbpwB1iJk/8Gt5ZF2bhS6+B6bPYz424KtwsR6Rflc3tCz1/ghX2dQ==","shasum":"357e8173e951ced3b5a2785c695993aa29dbcac4","tarball":"https://registry.npmjs.org/buffer-image-size/-/buffer-image-size-0.6.4.tgz","fileCount":18,"unpackedSize":17156,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4ul0rWBRi27Aoo6Bpy+bgEVCpg7B4fI7TJtZ2QuucbwIhAKvQvk36O4RH0HlDGcMI2N7tC8bpMhVGj2EuB/mkn2ZQ"}]},"maintainers":[{"name":"jccr","email":"juan.carlos.corona.r@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/buffer-image-size_0.6.4_1519870516301_0.49741097967319803"},"_hasShrinkwrap":false}},"time":{"created":"2018-03-01T01:56:37.612Z","0.6.2":"2018-03-01T01:56:37.663Z","modified":"2022-04-12T04:39:10.621Z","0.6.3":"2018-03-01T02:09:58.347Z","0.6.4":"2018-03-01T02:15:16.382Z"},"maintainers":[{"name":"jccr","email":"juan.carlos.corona.r@gmail.com"}],"description":"get dimensions of any image buffer","homepage":"https://github.com/evidentpoint/buffer-image-size#readme","keywords":["image","size","dimensions","resolution","width","height","png","jpeg","bmp","gif","psd","webp","svg","ico","cur"],"repository":{"type":"git","url":"git+https://github.com/evidentpoint/buffer-image-size.git"},"author":{"name":"netroy","email":"aditya@netroy.in","url":"http://netroy.in/"},"bugs":{"url":"https://github.com/evidentpoint/buffer-image-size/issues"},"license":"MIT","readme":"# buffer-image-size\n\nA [Node](https://nodejs.org/en/) module to get dimensions of any image ~~file~~ buffer\n\nFork of [image-size](https://github.com/image-size/image-size)\n\nThis fork doesn't use the 'fs' and 'path' node modules.\n\n\n## Supported formats\n\n* BMP\n* CUR\n* GIF\n* ICO\n* JPEG\n* PNG\n* PSD\n* ~~TIFF~~ (no buffer support)\n* WebP\n* SVG\n* DDS\n\n### Upcoming\n\n* SWF\n\n## Programmatic Usage\n\n```\nnpm install buffer-image-size --save\n```\n\n### Synchronous\n\n```javascript\nvar sizeOf = require('buffer-image-size');\nvar dimensions = sizeOf(yourImageBuffer);\nconsole.log(dimensions.width, dimensions.height);\n```\n\n### Asynchronous\n\nNo need for asynchronous usage in this fork.\nSee the original instead: https://github.com/image-size/image-size\n\n### Multi-size\n\nIf the target file is an icon (.ico) or a cursor (.cur), the `width` and `height` will be the ones of the first found image.\n\nAn additional `images` array is available and returns the dimensions of all the available images\n\n```javascript\nvar sizeOf = require('buffer-image-size');\nvar images = sizeOf(icoBuffer).images;\nfor (const dimensions of images) {\n  console.log(dimensions.width, dimensions.height);\n}\n```\n\n### Using a URL\n\n```javascript\nvar url = require('url');\nvar http = require('http');\n\nvar sizeOf = require('buffer-image-size');\n\nvar imgUrl = 'http://my-amazing-website.com/image.jpeg';\nvar options = url.parse(imgUrl);\n\nhttp.get(options, function (response) {\n  var chunks = [];\n  response.on('data', function (chunk) {\n    chunks.push(chunk);\n  }).on('end', function() {\n    var buffer = Buffer.concat(chunks);\n    console.log(sizeOf(buffer));\n  });\n});\n```\n\nYou can optionally check the buffer lengths & stop downloading the image after a few kilobytes.\n**You don't need to download the entire image**\n\n## Command-Line Usage (CLI)\n\nNo CLI usage in this fork.\nSee the original instead: https://github.com/image-size/image-size\n\n## Credits\n\nnot a direct port, but an attempt to have something like\n[dabble's imagesize](https://github.com/dabble/imagesize/blob/master/lib/image_size.rb) as a node module.\n\n## [Contributors](Contributors.md)\n","readmeFilename":"Readme.md"}