I am using piexifjs to manipulate exif data of jpg images. everything works fine. but when I try to modify the gps longitude and latitudes, I am having some issues.
as on https://www.exiv2.org/tags.html, it states the datatype for gps coordinates it a Rational and I am having trouble getting how it works.
gps[piexif.GPSIFD.GPSLatitude] = 23.234;
gps[piexif.GPSIFD.GPSLatitudeRef] = "S";
OR
gps[piexif.GPSIFD.GPSLatitude] = [23,23,23];
gps[piexif.GPSIFD.GPSLatitudeRef] = "S";
I can add all the others like Author, XPTitle... and yet it It doesn't work at all for gps coordinates.
This worked for me.
It accepts in an array of dimention [3,2] eg.
[[59, 1], [26, 1], [794, 100]]thanks to https://github.com/hMatoba/piexifjs/issues/1#issuecomment-260176317