Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pack Error #83

Open
tnsivanagarajan opened this issue Oct 21, 2022 · 1 comment
Open

Pack Error #83

tnsivanagarajan opened this issue Oct 21, 2022 · 1 comment

Comments

@tnsivanagarajan
Copy link

tnsivanagarajan commented Oct 21, 2022

Hi Everyone, I'm getting pack error when I use negative coordinates in my GPS option. Please refer the code and the error.

      var gps = {};
      var lat = 41.14916109;
      var lng = -109.85291821;
      gps[piexif.GPSIFD.GPSLatitudeRef] = lat < 0 ? "S" : "N";
      gps[piexif.GPSIFD.GPSLatitude] = piexif.GPSHelper.degToDmsRational(lat);
      gps[piexif.GPSIFD.GPSLongitudeRef] = lng < 0 ? "W" : "E";
      gps[piexif.GPSIFD.GPSLongitude] = piexif.GPSHelper.degToDmsRational(lng);

      exifObj.GPS = gps;

      var exifStr = piexif.dump(exifObj);

It returns pack error for the valid coordinates. Check below

/nodeapp/node_modules/piexifjs/piexif.js:775
                    throw ("'pack' error.");
                    ^
'pack' error.
(Use `node --trace-uncaught ...` to show where the exception was thrown)
@chriskhongqarma
Copy link

Anyone looking into this issue? I am having the same error message on Redmi K50. The error looks like below
message: 'pack' error., name: Error, stack: Error: 'pack' error. at pack (https://qarmainspect.com.ngrok.io/1.bundle.js:26319:25) at _packShort (https://qarmainspect.com.ngrok.io/1.bundle.js:26470:14) at _toShort (https://qarmainspect.com.ngrok.io/1.bundle.js:26586:29) at _valueToBytes (https://qarmainspect.com.ngrok.io/1.bundle.js:26497:23) at dictToBytes (https://qarmainspect.com.ngrok.io/1.bundle.js:26739:19) at Object.dump (https://qarmainspect.com.ngrok.io/1.bundle.js:27197:23) at https://qarmainspect.com.ngrok.io/bundle.js:12354:38 at $Q (https://qarmainspect.com.ngrok.io/lib/angular.js:18317:13) at Object.embedExifGPSData (https://qarmainspect.com.ngrok.io/bundle.js:12329:12) at https://qarmainspect.com.ngrok.io/bundle.js:11803:44 at processQueue (https://qarmainspect.com.ngrok.io/lib/angular.js:18016:53) at https://qarmainspect.com.ngrok.io/lib/angular.js:18064:36 at Scope.$digest (https://qarmainspect.com.ngrok.io/lib/angular.js:19183:37) at https://qarmainspect.com.ngrok.io/lib/angular.js:19503:48 at TaskTracker.completeTask (https://qarmainspect.com.ngrok.io/lib/angular.js:21304:17) at https://qarmainspect.com.ngrok.io/lib/angular.js:6880:29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants