hMatoba / piexifjs

Read and modify exif in client-side or server-side JavaScript.
MIT License
573 stars 118 forks source link

exif.slice is not a function #18

Closed aCodeAlchemist closed 7 years ago

aCodeAlchemist commented 7 years ago

I am trying to add extracted exif object and its showing this error:

exif.slice is not a function

    that.insert = function (exif, jpeg) {
        var b64 = false;
        if (exif.slice(0, 6) != "\x45\x78\x69\x66\x00\x00") {
            throw ("Given data is not exif.");
        }

This is the basic exif object. Its same as when I got it. I have not modified it.:

{
"0th"
"1st"
"Exif"
"GPS"
"Interop"
}

any idea why?

hMatoba commented 7 years ago

http://piexifjs.readthedocs.io/en/latest/functions.html#insert

aCodeAlchemist commented 7 years ago

Not an issue. My bad. Sorry.