Index: applications/editors/josm/plugins/photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/ExifGPSTagger.java
===================================================================
--- applications/editors/josm/plugins/photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/ExifGPSTagger.java	(revision 35714)
+++ applications/editors/josm/plugins/photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/ExifGPSTagger.java	(revision 35715)
@@ -23,4 +23,5 @@
 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;
@@ -29,7 +30,7 @@
     /**
      * 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
@@ -41,7 +42,7 @@
      * @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);
@@ -51,16 +52,17 @@
     }
 
-    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();
         }
 
@@ -97,5 +99,5 @@
             // 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),
@@ -145,5 +147,9 @@
 
         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: applications/editors/josm/plugins/photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/GeotaggingAction.java
===================================================================
--- applications/editors/josm/plugins/photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/GeotaggingAction.java	(revision 35714)
+++ applications/editors/josm/plugins/photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/GeotaggingAction.java	(revision 35715)
@@ -3,5 +3,7 @@
 
 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;
@@ -33,4 +35,5 @@
 import javax.swing.UIManager;
 
+import org.apache.commons.io.FilenameUtils;
 import org.openstreetmap.josm.gui.ExtendedDialog;
 import org.openstreetmap.josm.gui.MainApplication;
@@ -70,20 +73,38 @@
 
         final List<ImageEntry> images = new ArrayList<>();
+        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());
+
+        DefaultListModel<String> listModel = new DefaultListModel<>();
+        DecimalFormat dFormatter = new DecimalFormat("###0.000000");
+
         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);
-            }
-        }
-
-        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());
-
-        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())+")");
+                String pth = e.getFile().getAbsolutePath();
+                switch (FilenameUtils.getExtension(pth).toLowerCase()) {
+                    case "tif":
+                    case "tiff":
+                        hasTiff = true;
+                        // fall through (this comment makes the compiler happy)
+                    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;
+                }
+            }
         }
 
@@ -93,4 +114,17 @@
         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());
@@ -334,5 +368,5 @@
             // 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) {
Index: applications/editors/josm/plugins/photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/GeotaggingPlugin.java
===================================================================
--- applications/editors/josm/plugins/photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/GeotaggingPlugin.java	(revision 35714)
+++ applications/editors/josm/plugins/photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/GeotaggingPlugin.java	(revision 35715)
@@ -8,5 +8,5 @@
 /**
  * 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.
