Index: /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/NewLayerFromFileAction.java
===================================================================
--- /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/NewLayerFromFileAction.java	(revision 24307)
+++ /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/NewLayerFromFileAction.java	(revision 24308)
@@ -27,4 +27,5 @@
 import java.io.IOException;
 
+import javax.imageio.ImageIO;
 import javax.swing.JFileChooser;
 import javax.swing.JOptionPane;
@@ -50,14 +51,18 @@
         @Override
         public boolean accept(File f) {
+            if ( f.isDirectory() )
+                return true;
 
-            String ext3 = ( f.getName().length() > 4 ) ?  f.getName().substring( f.getName().length() - 4 ).toLowerCase() : "";
-            String ext4 = ( f.getName().length() > 5 ) ?  f.getName().substring( f.getName().length() - 5 ).toLowerCase() : "";
+            String fileExtension = f.getName().substring(f.getName().lastIndexOf('.')+1);
+            String[] supportedExtensions = ImageIO.getReaderFormatNames();
 
-            // TODO: check what is supported by Java :)
-            return ( f.isDirectory()
-                ||  ext3.equals( ".jpg" )
-                ||  ext4.equals( ".jpeg" )
-                ||  ext3.equals( ".png" )
-                );
+            // Unfortunately, getReaderFormatNames does not always return ALL extensions in 
+            // both lower and upper case, so we can not do a search in the array
+            for (String e: supportedExtensions)
+                if ( e.toLowerCase().equals(fileExtension) ) {
+                    return true;
+                }
+                    
+            return false;
         }
 
@@ -65,5 +70,5 @@
         @Override
         public String getDescription() {
-            return tr("Image files");
+            return tr("Supported image files");
         }
 
Index: /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerAbstract.java
===================================================================
--- /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerAbstract.java	(revision 24307)
+++ /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerAbstract.java	(revision 24308)
@@ -129,5 +129,5 @@
         Image image = createImage();
         if ( image == null ) {
-            throw new IOException(tr("Image not created properly."));
+            throw new IOException(tr("PicLayer failed to load or import the image."));
         }
         // Convert to Buffered Image - not sure if this is the right way...
