Index: trunk/src/org/openstreetmap/josm/tools/ImageResource.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ImageResource.java	(revision 9249)
+++ trunk/src/org/openstreetmap/josm/tools/ImageResource.java	(revision 9251)
@@ -163,4 +163,13 @@
             realWidth = svg.getWidth();
             realHeight = svg.getHeight();
+            /* extend small images to the possible maximum, may get reduced later again */
+            if(maxSize.width != -1 && realWidth < maxSize.width) {
+                realHeight *= maxSize.width/realWidth;
+                realWidth = maxSize.width;
+            }
+            if(maxSize.height != -1 && realHeight < maxSize.height) {
+                realWidth *= maxSize.height/realHeight;
+                realHeight = maxSize.height;
+            }
         } else {
             if (baseImage == null) throw new AssertionError();
