Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
d12b820
Source cleanup to make more future-proof.
DougReeder Jan 31, 2012
c9654ac
Remove unused require('util'); source cleanup to make more future-proof.
DougReeder Jan 31, 2012
31c6be9
Merge branch 'master' of github.com:DougReeder/node-exif
DougReeder Jan 31, 2012
9e2ce66
Added Jasmine unit tests for EXIF data.
DougReeder Feb 3, 2012
339d572
Cleanup to support future expansion.
DougReeder Feb 8, 2012
2b83a19
Crude fix for invalid exif data - check for a numberOfEntries >100 (t…
cianclarke Jul 8, 2012
7400c1e
Crude fix to ExifImage based on high numberOfEntries figures
cianclarke Jul 8, 2012
7f61a74
Actually return on error with high numberOfEntries...
cianclarke Jul 8, 2012
af2713c
Merge pull request #1 from DougReeder/master
sujal Feb 19, 2013
a8d4a45
Fixed unsigned rational and signed rational extraction
jazzzz Oct 29, 2012
214e373
project setup - add devDependencies, gitignore
sujal Feb 19, 2013
a16ac81
add an option to parse a direct EXIF buffer
sujal Feb 19, 2013
d443908
merge in ohardy's fix
sujal Feb 19, 2013
5e88de5
make the extract exif method use a callback
sujal Feb 19, 2013
a83eb6f
enhance error messages
sujal Feb 19, 2013
e80febd
fix bug calculating IFD1 offsets for 0 entry field
sujal Feb 19, 2013
d2892f4
Merge branch 'master' of git://github.com/gomfunkel/node-exif into go…
sujal Jun 14, 2013
179967e
fix tests
sujal Jun 14, 2013
0c990ed
fix gpsinfo offset of 0 leak
sujal Jun 15, 2013
6c6da3b
add a check to make sure makernote is parsed as a buffer before
sujal Jun 15, 2013
d8441e3
Detect flipped makernote endianness, adjust parsing (includes testdata &
sujal Jun 16, 2013
60271b8
check if components > file size, abort param extract
sujal Jun 16, 2013
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
npm-debug.log
*.sublime-project
*.sublime-workspace
.DS_Store
14 changes: 7 additions & 7 deletions lib/exif/Buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,30 @@
//

Buffer.prototype.getByte = function (offset) {
return this[offset];
return this[offset];
};

Buffer.prototype.getSignedByte = function (offset) {
return (this[offset] > 127) ? this[offset] - 256 : this[offset];
return (this[offset] > 127) ? this[offset] - 256 : this[offset];
};

Buffer.prototype.getShort = function (offset, bigEndian) {
var shortVal = (bigEndian) ? (this[offset] << 8) + this[offset + 1] : (this[offset + 1] << 8) + this[offset];
var shortVal = (bigEndian) ? (this[offset] << 8) + this[offset + 1] : (this[offset + 1] << 8) + this[offset];
return (shortVal < 0) ? shortVal + 65536 : shortVal;
};

Buffer.prototype.getSignedShort = function (offset, bigEndian) {
var shortVal = (bigEndian) ? (this[offset] << 8) + this[offset + 1] : (this[offset + 1] << 8) + this[offset];
var shortVal = (bigEndian) ? (this[offset] << 8) + this[offset + 1] : (this[offset + 1] << 8) + this[offset];
return (shortVal > 32767) ? shortVal - 65536 : shortVal;
};

Buffer.prototype.getLong = function (offset, bigEndian) {
var longVal = (bigEndian) ? (((((this[offset] << 8) + this[offset + 1]) << 8) + this[offset + 2]) << 8) + this[offset + 3] : (((((this[offset + 3] << 8) + this[offset + 2]) << 8) + this[offset + 1]) << 8) + this[offset];
var longVal = (bigEndian) ? (((((this[offset] << 8) + this[offset + 1]) << 8) + this[offset + 2]) << 8) + this[offset + 3] : (((((this[offset + 3] << 8) + this[offset + 2]) << 8) + this[offset + 1]) << 8) + this[offset];
return (longVal < 0) ? longVal + 4294967296 : longVal;
};

Buffer.prototype.getSignedLong = function (offset, bigEndian) {
var longVal = (bigEndian) ? (((((this[offset] << 8) + this[offset + 1]) << 8) + this[offset + 2]) << 8) + this[offset + 3] : (((((this[offset + 3] << 8) + this[offset + 2]) << 8) + this[offset + 1]) << 8) + this[offset];
var longVal = (bigEndian) ? (((((this[offset] << 8) + this[offset + 1]) << 8) + this[offset + 2]) << 8) + this[offset + 3] : (((((this[offset + 3] << 8) + this[offset + 2]) << 8) + this[offset + 1]) << 8) + this[offset];
return (longVal > 2147483647) ? longVal - 4294967296 : longVal;
};

Expand All @@ -35,4 +35,4 @@ Buffer.prototype.getString = function (offset, length) {
for (var i = offset; i < offset + length; i++)
string.push(String.fromCharCode(this[i]));
return string.join('');
};
};
Loading