Skip to content

Commit 7b9140a

Browse files
authored
Merge pull request #66 from ImageQuix/slong
Support parsing SLONG data type
2 parents af772e2 + 19d2976 commit 7b9140a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

piexif.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,15 @@ SOFTWARE.
594594
} else {
595595
data = value.slice(0, length);
596596
}
597+
} else if (t == 9) { // SLONG
598+
if (length > 1) {
599+
pointer = unpack(this.endian_mark + "L", value)[0];
600+
data = unpack(this.endian_mark + nStr("l", length),
601+
this.tiftag.slice(pointer, pointer + length * 4));
602+
} else {
603+
data = unpack(this.endian_mark + nStr("l", length),
604+
value);
605+
}
597606
} else if (t == 10) { // SRATIONAL
598607
pointer = unpack(this.endian_mark + "L", value)[0];
599608
if (length > 1) {

0 commit comments

Comments
 (0)