GPS Tag Lan/Long format?
GPS Tag Lan/Long format?
I try use TagsWriteTypeASCII to create GPS tags, some is ok,
but some is confuse.
for example, I try:
oGdPicture.TagsWriteTypeASCII PropertyTagGpsLongitude, "33°24'51.8"""
The code is work, but when I read the Longtiude value , the value is mistake.
I also try "33/1,24/1,518/10" , still mistake, "33 24 518" also mistake..
What's the correct format of this?
The same question in "PropertyTagGpsGpsTime" tag, what's the correct format?
I tryed "12:12:12", got "00:00:00",, tryed "12:12:12 UTC:, got "00:00:00 UTC".. tryed "2006/05/30 12:12:12" ..... still mistake...
And, I found there are no "PropertyTagGpsGpsDate" tag, so, how do I set the GPS tag "GPSDateStamp"
Please help.. many Thanks!
but some is confuse.
for example, I try:
oGdPicture.TagsWriteTypeASCII PropertyTagGpsLongitude, "33°24'51.8"""
The code is work, but when I read the Longtiude value , the value is mistake.
I also try "33/1,24/1,518/10" , still mistake, "33 24 518" also mistake..
What's the correct format of this?
The same question in "PropertyTagGpsGpsTime" tag, what's the correct format?
I tryed "12:12:12", got "00:00:00",, tryed "12:12:12 UTC:, got "00:00:00 UTC".. tryed "2006/05/30 12:12:12" ..... still mistake...
And, I found there are no "PropertyTagGpsGpsDate" tag, so, how do I set the GPS tag "GPSDateStamp"
Please help.. many Thanks!
OK I've foud the description of the PropertyTagDateStamp TAG:
http://www.awaresystems.be/imaging/tiff ... stamp.html
I will add aditional tags for the next release.
For the moment you can do like this:
(vb6 sample)
For the description of all the tags:
http://www.awaresystems.be/imaging/tiff ... d/gps.html
http://www.awaresystems.be/imaging/tiff ... stamp.html
I will add aditional tags for the next release.
For the moment you can do like this:
(vb6 sample)
Code: Select all
Const PropertyTagDateStamp = &H1D
oGdPicture.TagsWriteTypeASCII PropertyTagDateStamp , "2007:05:31"
http://www.awaresystems.be/imaging/tiff ... d/gps.html
Last edited by Loïc on Mon Aug 27, 2007 10:31 am, edited 2 times in total.
All of my code is here:
the test photo file test.jpg already contain GPS Tags, you can download the test.jpg file here:
http://www.flickr.com/photo_zoom.gne?id ... 539&size=o
I use "Opanda IExif 2.26" to read the GPS Tags, the result is follow:
If I use ExifTag.exe which come from GDPicture sample code folder, the result is:
Remember all above data is come from test.jpg,, Now we run my vb code to create test1.jpg, you can download the test1.jpg here:
http://www.flickr.com/photo_zoom.gne?id ... 719&size=o
Ok, let's check test1.jpg with "Opanda IExif 2.26", the result is:
The Longitude/time stamp is all mistake, and the "date" field is lose.
then, let us check the test1.jpg with ExifTag.exe, the result is:
Looks like the Longitude and time is ok,, but, it's incorrect. and the
GPSdate are lose too.
Opanda IExif is freeware, you can download it here:
http://www.opanda.com/en/iexif/download.htm
My Platform is Windows Server 2003 BIG5 Taiwan edition, VB6 Sp6 english version.
Thanks!
Code: Select all
Dim ii As Long
Dim oGdPicture As GdpicturePro.cGdPicture
Set oGdPicture = New GdpicturePro.cGdPicture
oGdPicture.SetLicenceNumber ("0012345678910111213141516") 'Demo code version
ii = oGdPicture.LoadFromFile("c:\test.jpg")
oGdPicture.TagsWriteTypeASCII PropertyTagGpsVer, "2.1"
oGdPicture.TagsWriteTypeASCII PropertyTagGpsLongitude, "130°33'31.4"""
oGdPicture.TagsWriteTypeASCII PropertyTagGpsGpsTime, "12:05:06"
oGdPicture.TagsWriteTypeASCII &H1D, "2007:11:22"
oGdPicture.SaveAsJpeg "c:\test1.jpg"
oGdPicture.CloseImage ii
http://www.flickr.com/photo_zoom.gne?id ... 539&size=o
I use "Opanda IExif 2.26" to read the GPS Tags, the result is follow:
Code: Select all
[GPS]
GPS Version ID = Version 2.2
GPS Latitude Ref = North latitude
GPS Latitude = 33°24'51.8"
GPS Longitude Ref = East longitude
GPS Longitude = 130°33'31.4"
GPS Time Stamp = 22:14:39 UTC
GPS Status = Measurement in progress
GPS Map Datum = WGS-84
GPS Date Stamp = 2006-11-02 UTC
Code: Select all
GpsVer: 1 4
GpsLatitudeRef: N
GpsLatitude: 33/1, 24/1, 518/10
GpsLongitudeRef: E
GpsLongitude: 130/1, 33/1, 314/10
GpsGpsTime: 22/1, 14/1, 39/1
GpsGpsStatus: A
GpsMapDatum: WGS-84
Unknown TAG: 2006:11:02
http://www.flickr.com/photo_zoom.gne?id ... 719&size=o
Ok, let's check test1.jpg with "Opanda IExif 2.26", the result is:
Code: Select all
[GPS]
GPS Version ID = 2.1
GPS Latitude Ref = North latitude
GPS Latitude = 33°24'51.8"
GPS Longitude Ref = East longitude
GPS Longitude = 559509°50'19.6746"
GPS Time Stamp = 00:00:00 UTC
GPS Status = Measurement in progress
GPS Map Datum = WGS-84
then, let us check the test1.jpg with ExifTag.exe, the result is:
Code: Select all
GpsVer: 2.1
GpsLatitudeRef: N
GpsLatitude: 33/1, 24/1, 518/10
GpsLongitudeRef: E
GpsLongitude: 130°33'31.4"
GpsGpsTime: 12:05:06
GpsGpsStatus: A
GpsMapDatum: WGS-84
GPSdate are lose too.
Opanda IExif is freeware, you can download it here:
http://www.opanda.com/en/iexif/download.htm
My Platform is Windows Server 2003 BIG5 Taiwan edition, VB6 Sp6 english version.
Thanks!
After few hours study, I am very sure it's a bug of gdpicture. you may check this document:
http://www.sno.phy.queensu.ca/~phil/exi ... s/GPS.html
The data format of GPSLatitude is rational64u[3], it's mean is 24 bytes
of binary data. ok, let check the test.jpg file:
the longitude is 33°24'51.8"
In test.jpg file base 0x566 contain binary data:
21 00 00 00 01 00 00 00 --> 33/1
18 00 00 00 01 00 00 00 --> 24/1
06 02 00 00 0A 00 00 00 --> 518/10
Yes, it's 33/1°, 24/1', 518/10", first 4 bytes div last 4 bytes
And , after run TagsWriteTypeASCII PropertyTagGpsLongitude, "33°24'51.8"""
, the Longitude data in test1.jpg is a ASCII string 33°24'51.8"
It's totally mistake. because Longitude is binary format (rational64u) not ascii string.
http://www.sno.phy.queensu.ca/~phil/exi ... s/GPS.html
The data format of GPSLatitude is rational64u[3], it's mean is 24 bytes
of binary data. ok, let check the test.jpg file:
the longitude is 33°24'51.8"
In test.jpg file base 0x566 contain binary data:
21 00 00 00 01 00 00 00 --> 33/1
18 00 00 00 01 00 00 00 --> 24/1
06 02 00 00 0A 00 00 00 --> 518/10
Yes, it's 33/1°, 24/1', 518/10", first 4 bytes div last 4 bytes
And , after run TagsWriteTypeASCII PropertyTagGpsLongitude, "33°24'51.8"""
, the Longitude data in test1.jpg is a ASCII string 33°24'51.8"
It's totally mistake. because Longitude is binary format (rational64u) not ascii string.
Hi,
I've added new methods into the gdpicture pro 3.7 (beta):
TagsGetType
https://www.gdpicture.com/references/gdp ... tType.html
TagsWriteTypeRational
https://www.gdpicture.com/references/gdp ... ional.html
TagsWriteTypeLong
https://www.gdpicture.com/references/gdp ... eLong.html
TagsWriteTypeShort
https://www.gdpicture.com/references/gdp ... Short.html
TagsWriteTypeByte
https://www.gdpicture.com/references/gdp ... eByte.html
Now you can use this syntax for the GPSLatitude:
You can download the beta release here:
https://www.gdpicture.com/ressources/betas/
Best regards,
Loïc Carrère
I've added new methods into the gdpicture pro 3.7 (beta):
TagsGetType
https://www.gdpicture.com/references/gdp ... tType.html
TagsWriteTypeRational
https://www.gdpicture.com/references/gdp ... ional.html
TagsWriteTypeLong
https://www.gdpicture.com/references/gdp ... eLong.html
TagsWriteTypeShort
https://www.gdpicture.com/references/gdp ... Short.html
TagsWriteTypeByte
https://www.gdpicture.com/references/gdp ... eByte.html
Now you can use this syntax for the GPSLatitude:
Code: Select all
TagsWriteTypeRational PropertyTagGpsLongitude, "33/1,24/1,518/10"
You can download the beta release here:
https://www.gdpicture.com/ressources/betas/
Best regards,
Loïc Carrère
Hi~ Thanks for your quck help. I tryed the new version, my code is here:
.TagsWriteTypeByte PropertyTagGpsVer, "2,2,0,0"
.TagsWriteTypeASCII PropertyTagGpsLongitudeRef, "E"
.TagsWriteTypeASCII PropertyTagGpsLatitudeRef, "N"
.TagsWriteTypeRational PropertyTagGpsLongitude, "131/1,33/1,314/10"""
.TagsWriteTypeRational PropertyTagGpsLatitude, "32/1,24/1,518/10"
.TagsWriteTypeASCII PropertyTagGpsMapDatum, "WGS-84"
.TagsWriteTypeRational PropertyTagGpsGpsTime, "12/1,05/1,06/1"
.TagsWriteTypeASCII &H1D, "2007:11:22"
.TagsWriteTypeASCII PropertyTagGpsGpsStatus, "A"
Every thing is ok but GPSDateStamp (&H1D) not work...
Thanks again!
.TagsWriteTypeByte PropertyTagGpsVer, "2,2,0,0"
.TagsWriteTypeASCII PropertyTagGpsLongitudeRef, "E"
.TagsWriteTypeASCII PropertyTagGpsLatitudeRef, "N"
.TagsWriteTypeRational PropertyTagGpsLongitude, "131/1,33/1,314/10"""
.TagsWriteTypeRational PropertyTagGpsLatitude, "32/1,24/1,518/10"
.TagsWriteTypeASCII PropertyTagGpsMapDatum, "WGS-84"
.TagsWriteTypeRational PropertyTagGpsGpsTime, "12/1,05/1,06/1"
.TagsWriteTypeASCII &H1D, "2007:11:22"
.TagsWriteTypeASCII PropertyTagGpsGpsStatus, "A"
Every thing is ok but GPSDateStamp (&H1D) not work...
Thanks again!
I think this problem come from Opanda IExif now.
This is the GPSDateStamp Tag STD:
If you use this code:
It is working.
The only thing is that the Opanda IExif does not seems to recognise this tag as GPSDateStamp Tag. It returns only Entry 001D.
And the entry 001D is the hex code of the GPSDateStamp Tag.
Best regards,
Loïc
This is the GPSDateStamp Tag STD:
Code: Select all
TIFF Tag GPSDateStamp
IFD GPS
Code 29 (hex 0x001D)
Name GPSDateStamp
Type ASCII
Count 11
Default None
Code: Select all
.TagsWriteTypeASCII PropertyTagGpsDateStamp, "2007:11:22."
It is working.
The only thing is that the Opanda IExif does not seems to recognise this tag as GPSDateStamp Tag. It returns only Entry 001D.
And the entry 001D is the hex code of the GPSDateStamp Tag.
Best regards,
Loïc
hi~
I tryed this code:
.LoadFromFile("c:\test.jpg")
.TagsWriteTypeASCII PropertyTagGpsDateStamp, "2007:11:22"
.SaveAsJpeg "c:\test2.jpg"
it's not work, the GPSDateStamp Tag just erased. and I think it's not Opanda IExif's bug.
Because I also try other 3 programs:
1.ExifTool by Phil Harvey
2.Photo Explorer 8.5 from ULead Systems
3.ExifTag.exe from GDPicture samle code area.
These 3 programs all can get correct GPSDateStamp from origional jpeg file (test.jpg)
, and all can't get GPSDateStamp from target jpeg file (test2.jpg)
And, we know GPSDateStamp is ascii string format, I use binary search program to search the test2.jpg file, also can't find string "2007:11:22"
I tryed this code:
.LoadFromFile("c:\test.jpg")
.TagsWriteTypeASCII PropertyTagGpsDateStamp, "2007:11:22"
.SaveAsJpeg "c:\test2.jpg"
it's not work, the GPSDateStamp Tag just erased. and I think it's not Opanda IExif's bug.
Because I also try other 3 programs:
1.ExifTool by Phil Harvey
2.Photo Explorer 8.5 from ULead Systems
3.ExifTag.exe from GDPicture samle code area.
These 3 programs all can get correct GPSDateStamp from origional jpeg file (test.jpg)
, and all can't get GPSDateStamp from target jpeg file (test2.jpg)
And, we know GPSDateStamp is ascii string format, I use binary search program to search the test2.jpg file, also can't find string "2007:11:22"
Hi,
Ok I've understood what's append.
In fact the GPSDateStamp is unknown by the gdiplus.dll version < 6.
You need to use the last gdiplus.dll edition.
With windows Vista, you have nothing to do. It will works!
With Windows XP you have to use one of the solution described here:
[Link to the old forum deleted]
I suggest this one:
Best regards,
Loïc Carrère
Ok I've understood what's append.
In fact the GPSDateStamp is unknown by the gdiplus.dll version < 6.
You need to use the last gdiplus.dll edition.
With windows Vista, you have nothing to do. It will works!
With Windows XP you have to use one of the solution described here:
[Link to the old forum deleted]
I suggest this one:
- Creates an empty ApplicationName.exe.local file in the same directory as your application. (Use your applicaiton name instead ApplicationName).
- Copy to the gdiplus.dll of the redist forder into this same directory.
Best regards,
Loïc Carrère
Who is online
Users browsing this forum: Ahrefs [Bot] and 1 guest