title: Writing EXIF metadata to JPEG in Java
body: <p>I want to edit GPS tag and save new GPS latitude and longitude to JPEG. Ok I found a <a href="http://commons.apache.org/imaging/" rel="nofollow">Sanselan Java library</a>  which lets to do it. There is an example how to write metadata <a href="http://massapi.com/source/sanselan-0.97-incubator/src/test/java/org/apache/sanselan/sampleUsage/WriteExifMetadataExample.java.html" rel="nofollow">WriteExifMetadataExample</a> end I used  changeExifMetadata(File jpegImageFile, File dst)
  method. It works but this example creates a new photo with new gps latitude/longitude. I would like to set new GPS values on the same photo, how can I do this ? </p>
  
  <p>Generally I want to create application similar to Picasa (photo viewer + google maps) .. and in this case when I drag and drop marker on map I want to save new gps exif metadata to photo.. so according with this example it will be create new photo every time? stupid ...I have a little experience with Java .. any sygestion/example is very usefull for me :) </p>