Index: photo_geotagging/build.xml
===================================================================
--- photo_geotagging/build.xml	(revision 35675)
+++ photo_geotagging/build.xml	(working copy)
@@ -4,7 +4,7 @@
     <!-- enter the SVN commit message -->
     <property name="commit.message" value=""/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="14153"/>
+    <property name="plugin.main.version" value="xxx"/>
 
     <property name="plugin.author" value="Paul Hartmann"/>
     <property name="plugin.class" value="org.openstreetmap.josm.plugins.photo_geotagging.GeotaggingPlugin"/>
Index: photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/ExifGPSTagger.java
===================================================================
--- photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/ExifGPSTagger.java	(revision 35675)
+++ photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/ExifGPSTagger.java	(working copy)
@@ -22,6 +22,7 @@
 import org.apache.commons.imaging.formats.jpeg.exif.ExifRewriter;
 import org.apache.commons.imaging.formats.tiff.TiffImageMetadata;
 import org.apache.commons.imaging.formats.tiff.constants.GpsTagConstants;
+import org.apache.commons.imaging.formats.tiff.write.TiffImageWriterLossy;
 import org.apache.commons.imaging.formats.tiff.write.TiffOutputDirectory;
 import org.apache.commons.imaging.formats.tiff.write.TiffOutputSet;
 
@@ -28,9 +29,9 @@
 public class ExifGPSTagger {
     /**
      * Set the GPS values in JPEG EXIF metadata.
-     * This is taken from one of the examples of the sanselan project.
+     * This is based on one of the examples of the sanselan project.
      *
-     * @param jpegImageFile A source image file.
+     * @param imageFile A source image file.
      * @param dst The output file.
      * @param lat latitude
      * @param lon longitude
@@ -40,9 +41,9 @@
      * @param imgDir image direction in degrees (0..360) - can be null if not available
      * @throws IOException in case of I/O error
      */
-    public static void setExifGPSTag(File jpegImageFile, File dst, double lat, double lon, Date gpsTime, Double speed, Double ele, Double imgDir) throws IOException {
+    public static void setExifGPSTag(File imageFile, File dst, double lat, double lon, Date gpsTime, Double speed, Double ele, Double imgDir) throws IOException {
         try {
-            setExifGPSTagWorker(jpegImageFile, dst, lat, lon, gpsTime, speed, ele, imgDir);
+            setExifGPSTagWorker(imageFile, dst, lat, lon, gpsTime, speed, ele, imgDir);
         } catch (ImageReadException ire) {
             throw new IOException(tr("Read error: "+ire), ire);
         } catch (ImageWriteException ire2) {
@@ -50,18 +51,19 @@
         }
     }
 
-    public static void setExifGPSTagWorker(File jpegImageFile, File dst, double lat, double lon, Date gpsTime, Double speed, Double ele, Double imgDir)
+    public static void setExifGPSTagWorker(File imageFile, File dst, double lat, double lon, Date gpsTime, Double speed, Double ele, Double imgDir)
             throws IOException, ImageReadException, ImageWriteException {
+
         TiffOutputSet outputSet = null;
+        ImageMetadata metadata = Imaging.getMetadata(imageFile);
 
-        ImageMetadata metadata = Imaging.getMetadata(jpegImageFile);
-        JpegImageMetadata jpegMetadata = (JpegImageMetadata) metadata;
-        if (null != jpegMetadata) {
-            TiffImageMetadata exif = jpegMetadata.getExif();
-
+        if (metadata instanceof JpegImageMetadata) {
+            TiffImageMetadata exif = ((JpegImageMetadata) metadata).getExif();
             if (null != exif) {
                 outputSet = exif.getOutputSet();
             }
+        } else if (metadata instanceof TiffImageMetadata) {
+            outputSet = ((TiffImageMetadata) metadata).getOutputSet();
         }
 
         if (null == outputSet) {
@@ -96,7 +98,7 @@
             // make sure to remove old value if present (this method will
             // not fail if the tag does not exist).
             gpsDirectory.removeField(GpsTagConstants.GPS_TAG_GPS_TIME_STAMP);
-            gpsDirectory.add(GpsTagConstants.GPS_TAG_GPS_TIME_STAMP, 
+            gpsDirectory.add(GpsTagConstants.GPS_TAG_GPS_TIME_STAMP,
                     RationalNumber.valueOf(hour),
                     RationalNumber.valueOf(minute),
                     RationalNumber.valueOf(second));
@@ -144,7 +146,11 @@
         }
 
         try (BufferedOutputStream os = new BufferedOutputStream(new FileOutputStream(dst))) {
-            new ExifRewriter().updateExifMetadataLossless(jpegImageFile, os, outputSet);
+            if (metadata instanceof JpegImageMetadata) {
+                new ExifRewriter().updateExifMetadataLossless(imageFile, os, outputSet);
+            } else if (metadata instanceof TiffImageMetadata) {
+                new TiffImageWriterLossy().write(os, outputSet);
+            }
         }
     }
 }
Index: photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/GeotaggingAction.java
===================================================================
--- photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/GeotaggingAction.java	(revision 35675)
+++ photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/GeotaggingAction.java	(working copy)
@@ -2,7 +2,9 @@
 package org.openstreetmap.josm.plugins.photo_geotagging;
 
 import static org.openstreetmap.josm.tools.I18n.tr;
+import static org.openstreetmap.josm.tools.I18n.trn;
 
+import java.awt.Color;
 import java.awt.Component;
 import java.awt.Dimension;
 import java.awt.GridBagLayout;
@@ -32,6 +34,7 @@
 import javax.swing.SwingUtilities;
 import javax.swing.UIManager;
 
+import org.apache.commons.io.FilenameUtils;
 import org.openstreetmap.josm.gui.ExtendedDialog;
 import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.PleaseWaitRunnable;
@@ -69,13 +72,9 @@
         GeoImageLayer layer = getLayer();
 
         final List<ImageEntry> images = new ArrayList<>();
-        for (ImageEntry e : layer.getImages()) {
-             /* Only write lat/lon to the file, if the position is known and
-                the GPS data changed. */
-            if (e.getPos() != null && e.hasNewGpsData()) {
-                images.add(e);
-            }
-        }
+        int notSupportedFilesCount = 0;
+        String notSupportedName = null;
+        boolean hasTiff = false;
 
         final JPanel cont = new JPanel(new GridBagLayout());
         cont.add(new JLabel(tr("Write position information into the exif header of the following files:")), GBC.eol());
@@ -82,9 +81,30 @@
 
         DefaultListModel<String> listModel = new DefaultListModel<>();
         DecimalFormat dFormatter = new DecimalFormat("###0.000000");
-        for (ImageEntry e : images) {
-            listModel.addElement(e.getFile().getAbsolutePath()+
-                " ("+dFormatter.format(e.getPos().lat())+","+dFormatter.format(e.getPos().lon())+")");
+
+        for (ImageEntry e : layer.getImages()) {
+             /* Only write lat/lon to the file, if the position is known and
+                the GPS data changed. */
+            if (e.getPos() != null && e.hasNewGpsData()) {
+                String pth = e.getFile().getAbsolutePath();
+                switch (FilenameUtils.getExtension(pth).toLowerCase()) {
+                    case "tif":
+                    case "tiff":
+                        hasTiff = true;
+                    case "jpg":
+                    case "jpeg":
+                        images.add(e);
+                        listModel.addElement(pth + " (" + dFormatter.format(e.getPos().lat()) + ","
+                                + dFormatter.format(e.getPos().lon()) + ")");
+                        break;
+                    default:
+                        notSupportedFilesCount++;
+                        if (notSupportedName == null) {
+                            notSupportedName = e.getFile().getName();
+                        }
+                        break;
+                }
+            }
         }
 
         JList<String> entryList = new JList<>(listModel);
@@ -93,6 +113,19 @@
         scroll.setPreferredSize(new Dimension(900, 250));
         cont.add(scroll, GBC.eol().fill(GBC.BOTH));
 
+        if (notSupportedFilesCount > 0) {
+            JLabel warn = new JLabel(trn("The file \"{0}\" can not be updated. Only JPEG and TIFF images are supported.",
+                    "{1} files can not be updated. Only JPEG and TIFF images are supported.", notSupportedFilesCount, notSupportedName, Integer.toString(notSupportedFilesCount)));
+            warn.setForeground(Color.RED);
+            cont.add(warn, GBC.eol());
+        }
+
+        if (hasTiff) {
+            JLabel warn = new JLabel(tr("Warning: Some metadata in TIFF files may be lost. Always keep a backup!"));
+            warn.setForeground(Color.RED);
+            cont.add(warn, GBC.eol());
+        }
+
         final JPanel settingsPanel = new JPanel(new GridBagLayout());
         settingsPanel.setBorder(BorderFactory.createTitledBorder(tr("settings")));
         cont.add(settingsPanel, GBC.eol().insets(3,10,3,0));
@@ -333,7 +366,7 @@
             // instead, let's use new File(), which doesn't actually create a file
             // for getting a unique file name, we use UUID.randomUUID()
             do {
-                fileTmp = new File(file.getParentFile(), "img" + UUID.randomUUID() + ".jpg");
+                fileTmp = new File(file.getParentFile(), "img" + UUID.randomUUID() + ".tmp");
             } while (fileTmp.exists());
             if (debug) {
                 System.err.println("TMP: "+fileTmp.getAbsolutePath());
Index: photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/GeotaggingPlugin.java
===================================================================
--- photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/GeotaggingPlugin.java	(revision 35675)
+++ photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/GeotaggingPlugin.java	(working copy)
@@ -7,7 +7,7 @@
 
 /**
  * This plugin is used to write latitude and longitude information
- * to the EXIF header of jpg files.
+ * to the EXIF header of jpg and tiff files.
  * It extends the core geoimage feature of JOSM by adding a new entry
  * to the right click menu of any image layer.
  *
