image-size
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -14,5 +14,5 @@ function isBMP (buffer) { | ||
var pngSignature = '\tPNG\r\n\u001a\n'; | ||
var pngSignature = 'PNG\r\n\u001a\n'; | ||
function isPNG (buffer) { | ||
if (pngSignature === buffer.toString('ascii', 0, 8)) { | ||
if (pngSignature === buffer.toString('ascii', 1, 8)) { | ||
if ('IHDR' !== buffer.toString('ascii', 12, 16)) { | ||
@@ -19,0 +19,0 @@ throw new TypeError('invalid png'); |
{ | ||
"name": "image-size", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "get dimensions of any image file", | ||
"main": "index.js", | ||
"engines": { | ||
"node": "~0.8.0" | ||
}, | ||
"bin": { | ||
@@ -7,0 +10,0 @@ "image-size": "./bin/image-size" |
@@ -1,8 +0,3 @@ | ||
#### Work in progress | ||
node module to detect dimentions of various supported image formats | ||
[![NPM version](https://badge.fury.io/js/image-size.png)](https://npmjs.org/package/image-size) [![Build Status](https://travis-ci.org/netroy/image-size.png?branch=master)](https://travis-ci.org/netroy/image-size) | ||
[![NPM version](https://badge.fury.io/js/image-size.png)](https://npmjs.org/package/image-size) | ||
[![Build Status](https://travis-ci.org/netroy/image-size.png?branch=master)](https://travis-ci.org/netroy/image-size) | ||
#### Instalation | ||
@@ -9,0 +4,0 @@ |
Sorry, the diff of this file is not supported yet
5740
29