in

ASP.NET Weblogs

This Blog

Syndication

Sponsors

Roiy Zysman

GPS Coordinates in JPEG C# Example - Looks like there is a western side to the world as well

image

In one of my previous posts , I provided an example of embedding GPS coordinates into a JPEG image. I had a bug!. It only took care of the eastern side of the world.
A comment by John about not working with negative longitude numbers identified the issue, thanks John!. 
Well, watching the Olympics , and the concept of living in a global village have motivated me to sit down and fix my code so all of you people on the left side of the prime meridian can embed you Geo location in your Jpegs as well.

JPEG GPS Coordinates GeoTag Exif Example

Comments

 

Mauro said:

Hmm... I wonder if that would apply to the North and South Latitude...

August 12, 2008 8:08 PM
 

Embedding GPS coordinates and other info in JPEG images with C# - Roiy Zysman said:

Pingback from  Embedding GPS coordinates and other info in JPEG images with C# - Roiy Zysman

August 13, 2008 6:33 AM
 

zroiy said:

Mauro,

Sure it will...

August 14, 2008 12:46 PM
 

Gopi.Krishna said:

hi

Thanks for your code, however the code doesnt work for all the images, I probably belive it is becos the seconds are stored as decimals even if I give it has 12 it only stores as 11.99, and may I know the logic behind this code

secHelper = (byte)(lonSec / 2.56);

           secRemains = (byte)((lonSec - (secHelper * 2.56)) * 100);

           newProperties[1].Value[16] = secRemains;

           // add to the sum bellow x_x_*17_+16

           newProperties[1].Value[17] = secHelper;

why the seconds are stored like this, when degree and minutes are stored as integers.. your reply is appreciated. reply me @ mrgopi.krishna@gmail.com

September 24, 2008 6:47 AM
 

Recent Links Tagged With "example" - JabberTags said:

Pingback from  Recent Links Tagged With "example" - JabberTags

May 17, 2009 5:04 AM

Leave a Comment

(required)  
(optional)
(required)  
Add