Loading...

GPS Tag Lan/Long format?

Support for GdPicture Light Imaging Toolkit and GdPicture Pro Imaging ActiveX/SDK.

GPS Tag Lan/Long format?

Postby leeone » Thu May 31, 2007 4:06 am

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? :roll:

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... :shock:

And, I found there are no "PropertyTagGpsGpsDate" tag, so, how do I set the GPS tag "GPSDateStamp" :?:

Please help.. many Thanks! :wink:
leeone
 
Posts: 5
Joined: Thu May 31, 2007 3:03 am

Postby Loïc » Thu May 31, 2007 10:01 am

Hi,

1:

This syntax oGdPicture.TagsWriteTypeASCII PropertyTagGpsLongitude, "33°24'51.8" is working for me.

Which software are you using to view the Gps tags ?

2:

I never heard about the GPSDateStamp TAGS ? Do you get any information about it ?

Regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Postby Loïc » Thu May 31, 2007 10:17 am

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)

Code: Select all
Const PropertyTagDateStamp = &H1D

oGdPicture.TagsWriteTypeASCII PropertyTagDateStamp , "2007:05:31"


For the description of all the tags:

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.
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Postby leeone » Thu May 31, 2007 3:55 pm

All of my code is here:
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


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:
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


If I use ExifTag.exe which come from GDPicture sample code folder, the result is:
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


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:
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


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:
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


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!
leeone
 
Posts: 5
Joined: Thu May 31, 2007 3:03 am

Postby leeone » Thu May 31, 2007 4:55 pm

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.
leeone
 
Posts: 5
Joined: Thu May 31, 2007 3:03 am

Postby Loïc » Thu May 31, 2007 5:43 pm

Yes you are right.

The TagsWriteTypeASCII() stores always the tag value as ASCII.




I will try to add a TagsWriteTypeRational() method (for this end of week) using a string mask like this one: #/#,#/#,#/#....#/#


Best regards,

Loïc Carrère
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Postby Loïc » Fri Jun 01, 2007 2:37 pm

Hi,

I've added new methods into the gdpicture pro 3.7 (beta):


TagsGetType
http://www.gdpicture.com/references/gdp ... tType.html

TagsWriteTypeRational
http://www.gdpicture.com/references/gdp ... ional.html

TagsWriteTypeLong
http://www.gdpicture.com/references/gdp ... eLong.html

TagsWriteTypeShort
http://www.gdpicture.com/references/gdp ... Short.html

TagsWriteTypeByte
http://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:

http://www.gdpicture.com/ressources/betas/


Best regards,

Loïc Carrère
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Postby leeone » Fri Jun 01, 2007 6:48 pm

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!
leeone
 
Posts: 5
Joined: Thu May 31, 2007 3:03 am

Postby Loïc » Sun Jun 03, 2007 8:25 pm

I think this problem come from Opanda IExif now.

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


If you use this code:


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
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Postby leeone » Mon Jun 04, 2007 5:19 pm

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"
leeone
 
Posts: 5
Joined: Thu May 31, 2007 3:03 am

Postby Loïc » Tue Jun 05, 2007 10:06 am

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:


- 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
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France


Return to GdPicture [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest

cron