gomfunkel/node-exif — Issue #4: Fails with small images?
Author: Jellyfrog
Created: 2012-02-28 11:31:45+00:00
State: open

```
buffer.js:516
if (end > this.length) throw new Error('oob');
^
Error: oob
at Buffer.slice (buffer.js:516:32)
at ExifImage.extractExifEntry (/usr/home/node/anon/node_modules/exif/lib/exif/ExifImage.js:243:14)
at ExifImage.extractExifData (/usr/home/node/anon/node_modules/exif/lib/exif/ExifImage.js:167:25)
at ExifImage.processImage (/usr/home/node/anon/node_modules/exif/lib/exif/ExifImage.js:100:9)
at /usr/home/node/anon/node_modules/exif/lib/exif/ExifImage.js:69:10
at [object Object]. (fs.js:115:5)
at [object Object].emit (events.js:64:17)
at afterRead (fs.js:1112:12)
at Object.wrapper [as oncomplete] (fs.js:254:17)

```

This image failes: http://cdn.anonfiles.com/1330428503935.jpg
This works: http://cdn.anonfiles.com/1330428555739.jpg

Using the example code

```javascript
var ExifImage = require('exif').ExifImage;

try {
new ExifImage({ image : 'tiny.jpg' }, function (error, image) {
if (error)
console.log('Error: '+error.message);
else
console.log(image); // Do something with your data!
});
} catch (error) {
console.log('Error: ' + error);
}
```