Index: src/org/openstreetmap/josm/actions/AboutAction.java
===================================================================
--- src/org/openstreetmap/josm/actions/AboutAction.java	(revision 10368)
+++ src/org/openstreetmap/josm/actions/AboutAction.java	(working copy)
@@ -104,7 +104,7 @@
         // Intermediate panel to allow proper optionPane resizing
         JPanel panel = new JPanel(new GridBagLayout());
         panel.setPreferredSize(new Dimension(890, 300));
-        panel.add(new JLabel("", new ImageIcon(ImageProvider.get("logo.svg").getImage().getScaledInstance(256, 258, Image.SCALE_SMOOTH)),
+        panel.add(new JLabel("", new ImageProvider("logo.svg").setSize(ImageProvider.ImageSizes.ABOUT_LOGO).get(),
                 JLabel.CENTER), GBC.std().insets(0, 5, 0, 0));
         panel.add(about, GBC.std().fill());
 
Index: src/org/openstreetmap/josm/actions/AbstractSelectAction.java
===================================================================
--- src/org/openstreetmap/josm/actions/AbstractSelectAction.java	(revision 10368)
+++ src/org/openstreetmap/josm/actions/AbstractSelectAction.java	(working copy)
@@ -19,6 +19,6 @@
     public AbstractSelectAction() {
         putValue(NAME, tr("Select"));
         putValue(SHORT_DESCRIPTION,  tr("Set the selected elements on the map to the selected items in the list above."));
-        new ImageProvider("dialogs", "select").getResource().getImageIcon(this, true);
+        new ImageProvider("dialogs", "select").getResource().attachImageIcon(this, true);
     }
 }
Index: src/org/openstreetmap/josm/actions/AddImageryLayerAction.java
===================================================================
--- src/org/openstreetmap/josm/actions/AddImageryLayerAction.java	(revision 10368)
+++ src/org/openstreetmap/josm/actions/AddImageryLayerAction.java	(working copy)
@@ -62,7 +62,7 @@
                                 GuiHelper.runInEDT(new Runnable() {
                                     @Override
                                     public void run() {
-                                        result.getImageIcon(AddImageryLayerAction.this);
+                                        result.attachImageIcon(AddImageryLayerAction.this);
                                     }
                                 });
                             }
Index: src/org/openstreetmap/josm/actions/JosmAction.java
===================================================================
--- src/org/openstreetmap/josm/actions/JosmAction.java	(revision 10368)
+++ src/org/openstreetmap/josm/actions/JosmAction.java	(working copy)
@@ -72,7 +72,7 @@
             String toolbarId, boolean installAdapters) {
         super(name);
         if (icon != null)
-            icon.getResource().getImageIcon(this);
+            icon.getResource().attachImageIcon(this);
         setHelpId();
         sc = shortcut;
         if (sc != null) {
Index: src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java
===================================================================
--- src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java	(revision 10368)
+++ src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java	(working copy)
@@ -366,7 +366,7 @@
         CancelAction() {
             putValue(Action.SHORT_DESCRIPTION, tr("Cancel conflict resolution"));
             putValue(Action.NAME, tr("Cancel"));
-            new ImageProvider("cancel").getResource().getImageIcon(this);
+            new ImageProvider("cancel").getResource().attachImageIcon(this);
             setEnabled(true);
         }
 
@@ -381,7 +381,7 @@
         public ApplyAction() {
             putValue(Action.SHORT_DESCRIPTION, tr("Apply resolved conflicts"));
             putValue(Action.NAME, tr("Apply"));
-            new ImageProvider("ok").getResource().getImageIcon(this);
+            new ImageProvider("ok").getResource().attachImageIcon(this);
             updateEnabledState();
         }
 
Index: src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java
===================================================================
--- src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java	(revision 10368)
+++ src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java	(working copy)
@@ -264,7 +264,7 @@
         private CancelAction() {
             putValue(Action.SHORT_DESCRIPTION, tr("Cancel conflict resolution"));
             putValue(Action.NAME, tr("Cancel"));
-            new ImageProvider("cancel").getResource().getImageIcon(this);
+            new ImageProvider("cancel").getResource().attachImageIcon(this);
             setEnabled(true);
         }
 
@@ -280,7 +280,7 @@
         private ApplyAction() {
             putValue(Action.SHORT_DESCRIPTION, tr("Apply resolved conflicts"));
             putValue(Action.NAME, tr("Apply"));
-            new ImageProvider("ok").getResource().getImageIcon(this);
+            new ImageProvider("ok").getResource().attachImageIcon(this);
             updateEnabledState();
         }
 
Index: src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolver.java
===================================================================
--- src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolver.java	(revision 10368)
+++ src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolver.java	(working copy)
@@ -154,7 +154,7 @@
     class ApplyRoleAction extends AbstractAction {
         ApplyRoleAction() {
             putValue(NAME, tr("Apply"));
-            new ImageProvider("ok").getResource().getImageIcon(this);
+            new ImageProvider("ok").getResource().attachImageIcon(this);
             putValue(SHORT_DESCRIPTION, tr("Apply this role to all members"));
         }
 
Index: src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java
===================================================================
--- src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java	(revision 10368)
+++ src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java	(working copy)
@@ -375,7 +375,7 @@
         public SelectAction() {
             putValue(NAME, tr("Select"));
             putValue(SHORT_DESCRIPTION, tr("Selects the objects that take part in this command (unless currently deleted)"));
-            new ImageProvider("dialogs", "select").getResource().getImageIcon(this, true);
+            new ImageProvider("dialogs", "select").getResource().attachImageIcon(this, true);
         }
 
         @Override
@@ -410,7 +410,7 @@
             putValue(NAME, tr("Select and zoom"));
             putValue(SHORT_DESCRIPTION,
                     tr("Selects the objects that take part in this command (unless currently deleted), then and zooms to it"));
-            new ImageProvider("dialogs/autoscale", "selection").getResource().getImageIcon(this, true);
+            new ImageProvider("dialogs/autoscale", "selection").getResource().attachImageIcon(this, true);
         }
 
         @Override
@@ -446,12 +446,12 @@
                 tree = undoTree;
                 putValue(NAME, tr("Undo"));
                 putValue(SHORT_DESCRIPTION, tr("Undo the selected and all later commands"));
-                new ImageProvider("undo").getResource().getImageIcon(this, true);
+                new ImageProvider("undo").getResource().attachImageIcon(this, true);
             } else {
                 tree = redoTree;
                 putValue(NAME, tr("Redo"));
                 putValue(SHORT_DESCRIPTION, tr("Redo the selected and all earlier commands"));
-                new ImageProvider("redo").getResource().getImageIcon(this, true);
+                new ImageProvider("redo").getResource().attachImageIcon(this, true);
             }
         }
 
Index: src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java
===================================================================
--- src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java	(revision 10368)
+++ src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java	(working copy)
@@ -433,7 +433,7 @@
         ResolveAction() {
             putValue(NAME, tr("Resolve"));
             putValue(SHORT_DESCRIPTION,  tr("Open a merge dialog of all selected items in the list above."));
-            new ImageProvider("dialogs", "conflict").getResource().getImageIcon(this, true);
+            new ImageProvider("dialogs", "conflict").getResource().attachImageIcon(this, true);
             putValue("help", ht("/Dialog/ConflictList#ResolveAction"));
         }
 
Index: src/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialog.java
===================================================================
--- src/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialog.java	(revision 10368)
+++ src/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialog.java	(working copy)
@@ -157,7 +157,7 @@
         CancelAction() {
             putValue(Action.SHORT_DESCRIPTION, tr("Cancel conflict resolution and close the dialog"));
             putValue(Action.NAME, tr("Cancel"));
-            new ImageProvider("cancel").getResource().getImageIcon(this);
+            new ImageProvider("cancel").getResource().attachImageIcon(this);
             setEnabled(true);
         }
 
@@ -174,7 +174,7 @@
         HelpAction() {
             putValue(Action.SHORT_DESCRIPTION, tr("Show help information"));
             putValue(Action.NAME, tr("Help"));
-            new ImageProvider("help").getResource().getImageIcon(this);
+            new ImageProvider("help").getResource().attachImageIcon(this);
             setEnabled(true);
         }
 
@@ -192,7 +192,7 @@
         ApplyResolutionAction() {
             putValue(Action.SHORT_DESCRIPTION, tr("Apply resolved conflicts and close the dialog"));
             putValue(Action.NAME, tr("Apply Resolution"));
-            new ImageProvider("dialogs", "conflict").getResource().getImageIcon(this);
+            new ImageProvider("dialogs", "conflict").getResource().attachImageIcon(this);
             updateEnabledState();
         }
 
Index: src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java
===================================================================
--- src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java	(revision 10368)
+++ src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java	(working copy)
@@ -140,7 +140,7 @@
             {
                 putValue(NAME, tr("Add"));
                 putValue(SHORT_DESCRIPTION,  tr("Add filter."));
-                new ImageProvider("dialogs", "add").getResource().getImageIcon(this, true);
+                new ImageProvider("dialogs", "add").getResource().attachImageIcon(this, true);
             }
 
             @Override
@@ -155,7 +155,7 @@
             {
                 putValue(NAME, tr("Edit"));
                 putValue(SHORT_DESCRIPTION, tr("Edit filter."));
-                new ImageProvider("dialogs", "edit").getResource().getImageIcon(this, true);
+                new ImageProvider("dialogs", "edit").getResource().attachImageIcon(this, true);
             }
 
             @Override
@@ -173,7 +173,7 @@
             {
                 putValue(NAME, tr("Delete"));
                 putValue(SHORT_DESCRIPTION, tr("Delete filter."));
-                new ImageProvider("dialogs", "delete").getResource().getImageIcon(this, true);
+                new ImageProvider("dialogs", "delete").getResource().attachImageIcon(this, true);
             }
 
             @Override
@@ -188,7 +188,7 @@
             {
                 putValue(NAME, tr("Up"));
                 putValue(SHORT_DESCRIPTION, tr("Move filter up."));
-                new ImageProvider("dialogs", "up").getResource().getImageIcon(this, true);
+                new ImageProvider("dialogs", "up").getResource().attachImageIcon(this, true);
             }
 
             @Override
@@ -204,7 +204,7 @@
             {
                 putValue(NAME, tr("Down"));
                 putValue(SHORT_DESCRIPTION, tr("Move filter down."));
-                new ImageProvider("dialogs", "down").getResource().getImageIcon(this, true);
+                new ImageProvider("dialogs", "down").getResource().attachImageIcon(this, true);
             }
 
             @Override
Index: src/org/openstreetmap/josm/gui/dialogs/NotesDialog.java
===================================================================
--- src/org/openstreetmap/josm/gui/dialogs/NotesDialog.java	(revision 10368)
+++ src/org/openstreetmap/josm/gui/dialogs/NotesDialog.java	(working copy)
@@ -56,23 +56,27 @@
  */
 public class NotesDialog extends ToggleDialog implements LayerChangeListener {
 
+    private static ImageProvider iconOpenImageProvider = new ImageProvider("dialogs/notes", "note_open");
+    private static ImageProvider iconCloseImageProvider = new ImageProvider("dialogs/notes", "note_closed");
+    private static ImageProvider iconNewImageProvider = new ImageProvider("dialogs/notes", "note_closed");
+
     /** Small icon size for use in graphics calculations */
     public static final int ICON_SMALL_SIZE = 16;
     /** 24x24 icon for unresolved notes */
-    public static final ImageIcon ICON_OPEN = ImageProvider.get("dialogs/notes", "note_open");
+    public static final ImageIcon ICON_OPEN = iconOpenImageProvider.get();
     /** 16x16 icon for unresolved notes */
     public static final ImageIcon ICON_OPEN_SMALL =
-            new ImageIcon(ICON_OPEN.getImage().getScaledInstance(ICON_SMALL_SIZE, ICON_SMALL_SIZE, Image.SCALE_SMOOTH));
+            iconOpenImageProvider.setSize(ImageProvider.ImageSizes.SMALLICON).get();
     /** 24x24 icon for resolved notes */
-    public static final ImageIcon ICON_CLOSED = ImageProvider.get("dialogs/notes", "note_closed");
+    public static final ImageIcon ICON_CLOSED = iconCloseImageProvider.get();
     /** 16x16 icon for resolved notes */
     public static final ImageIcon ICON_CLOSED_SMALL =
-            new ImageIcon(ICON_CLOSED.getImage().getScaledInstance(ICON_SMALL_SIZE, ICON_SMALL_SIZE, Image.SCALE_SMOOTH));
+            iconCloseImageProvider.setSize(ImageProvider.ImageSizes.SMALLICON).get();
     /** 24x24 icon for new notes */
-    public static final ImageIcon ICON_NEW = ImageProvider.get("dialogs/notes", "note_new");
+    public static final ImageIcon ICON_NEW = iconNewImageProvider.get();
     /** 16x16 icon for new notes */
     public static final ImageIcon ICON_NEW_SMALL =
-            new ImageIcon(ICON_NEW.getImage().getScaledInstance(ICON_SMALL_SIZE, ICON_SMALL_SIZE, Image.SCALE_SMOOTH));
+            iconNewImageProvider.setSize(ImageProvider.ImageSizes.SMALLICON).get();
     /** Icon for note comments */
     public static final ImageIcon ICON_COMMENT = ImageProvider.get("dialogs/notes", "note_comment");
 
@@ -88,6 +92,13 @@
 
     private transient NoteData noteData;
 
+    static {
+        //Free unused fields
+        iconOpenImageProvider = null;
+        iconCloseImageProvider = null;
+        iconNewImageProvider = null;
+    }
+
     /** Creates a new toggle dialog for notes */
     public NotesDialog() {
         super(tr("Notes"), "notes/note_open", tr("List of notes"), null, 150);
Index: src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
===================================================================
--- src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java	(revision 10368)
+++ src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java	(working copy)
@@ -298,7 +298,7 @@
         SearchAction() {
             putValue(NAME, tr("Search"));
             putValue(SHORT_DESCRIPTION,   tr("Search for objects"));
-            new ImageProvider("dialogs", "search").getResource().getImageIcon(this, true);
+            new ImageProvider("dialogs", "search").getResource().attachImageIcon(this, true);
             updateEnabledState();
         }
 
@@ -360,7 +360,7 @@
         ShowHistoryAction() {
             putValue(NAME, tr("History"));
             putValue(SHORT_DESCRIPTION, tr("Display the history of the selected objects."));
-            new ImageProvider("dialogs", "history").getResource().getImageIcon(this, true);
+            new ImageProvider("dialogs", "history").getResource().attachImageIcon(this, true);
             updateEnabledState(model.getSize());
         }
 
@@ -400,7 +400,7 @@
         ZoomToJOSMSelectionAction() {
             putValue(NAME, tr("Zoom to selection"));
             putValue(SHORT_DESCRIPTION, tr("Zoom to selection"));
-            new ImageProvider("dialogs/autoscale", "selection").getResource().getImageIcon(this, true);
+            new ImageProvider("dialogs/autoscale", "selection").getResource().attachImageIcon(this, true);
             updateEnabledState();
         }
 
@@ -441,7 +441,7 @@
         ZoomToListSelection() {
             putValue(NAME, tr("Zoom to selected element(s)"));
             putValue(SHORT_DESCRIPTION, tr("Zoom to selected element(s)"));
-            new ImageProvider("dialogs/autoscale", "selection").getResource().getImageIcon(this, true);
+            new ImageProvider("dialogs/autoscale", "selection").getResource().attachImageIcon(this, true);
             updateEnabledState();
         }
 
Index: src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java
===================================================================
--- src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java	(revision 10368)
+++ src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java	(working copy)
@@ -157,7 +157,7 @@
         SelectUsersPrimitivesAction() {
             putValue(NAME, tr("Select"));
             putValue(SHORT_DESCRIPTION, tr("Select objects submitted by this user"));
-            new ImageProvider("dialogs", "select").getResource().getImageIcon(this, true);
+            new ImageProvider("dialogs", "select").getResource().attachImageIcon(this, true);
             updateEnabledState();
         }
 
@@ -192,7 +192,7 @@
             super(false);
             putValue(NAME, tr("Show info"));
             putValue(SHORT_DESCRIPTION, tr("Launches a browser with information about the user"));
-            new ImageProvider("help/internet").getResource().getImageIcon(this, true);
+            new ImageProvider("help/internet").getResource().attachImageIcon(this, true);
             updateEnabledState();
         }
 
Index: src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java
===================================================================
--- src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java	(revision 10368)
+++ src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java	(working copy)
@@ -119,7 +119,7 @@
             {
                 putValue(NAME, tr("Lookup"));
                 putValue(SHORT_DESCRIPTION, tr("Looks up the selected primitives in the error list."));
-                new ImageProvider("dialogs", "search").getResource().getImageIcon(this, true);
+                new ImageProvider("dialogs", "search").getResource().attachImageIcon(this, true);
             }
 
             @Override
@@ -140,7 +140,7 @@
             {
                 putValue(NAME, tr("Fix"));
                 putValue(SHORT_DESCRIPTION,  tr("Fix the selected issue."));
-                new ImageProvider("dialogs", "fix").getResource().getImageIcon(this, true);
+                new ImageProvider("dialogs", "fix").getResource().attachImageIcon(this, true);
             }
             @Override
             public void actionPerformed(ActionEvent e) {
@@ -155,7 +155,7 @@
                 {
                     putValue(NAME, tr("Ignore"));
                     putValue(SHORT_DESCRIPTION,  tr("Ignore the selected issue next time."));
-                    new ImageProvider("dialogs", "fix").getResource().getImageIcon(this, true);
+                    new ImageProvider("dialogs", "fix").getResource().attachImageIcon(this, true);
                 }
                 @Override
                 public void actionPerformed(ActionEvent e) {
Index: src/org/openstreetmap/josm/gui/help/ContextSensitiveHelpAction.java
===================================================================
--- src/org/openstreetmap/josm/gui/help/ContextSensitiveHelpAction.java	(revision 10368)
+++ src/org/openstreetmap/josm/gui/help/ContextSensitiveHelpAction.java	(working copy)
@@ -46,7 +46,7 @@
     public ContextSensitiveHelpAction(String helpTopic) {
         putValue(SHORT_DESCRIPTION, tr("Show help information"));
         putValue(NAME, tr("Help"));
-        new ImageProvider("help").getResource().getImageIcon(this);
+        new ImageProvider("help").getResource().attachImageIcon(this);
         this.helpTopic = helpTopic;
         setEnabled(!Main.isOffline(OnlineResource.JOSM_WEBSITE));
     }
Index: src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java
===================================================================
--- src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java	(revision 10368)
+++ src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java	(working copy)
@@ -381,17 +381,13 @@
     }
 
     final class SaveAndProceedAction extends AbstractAction implements PropertyChangeListener {
-        private static final int ICON_SIZE = 24;
         private static final String BASE_ICON = "BASE_ICON";
         private final transient Image save = ImageProvider.get("save").getImage();
         private final transient Image upld = ImageProvider.get("upload").getImage();
-        private final transient Image saveDis = new BufferedImage(ICON_SIZE, ICON_SIZE, BufferedImage.TYPE_4BYTE_ABGR);
-        private final transient Image upldDis = new BufferedImage(ICON_SIZE, ICON_SIZE, BufferedImage.TYPE_4BYTE_ABGR);
+        private final transient Image saveDis = new ImageProvider("save").getDisabledImage();
+        private final transient Image upldDis = new ImageProvider("upload").getDisabledImage();
 
         SaveAndProceedAction() {
-            // get disabled versions of icons
-            new JLabel(ImageProvider.get("save")).getDisabledIcon().paintIcon(new JPanel(), saveDis.getGraphics(), 0, 0);
-            new JLabel(ImageProvider.get("upload")).getDisabledIcon().paintIcon(new JPanel(), upldDis.getGraphics(), 0, 0);
             initForSaveAndExit();
         }
 
@@ -411,12 +407,15 @@
 
         public void redrawIcon() {
             Image base = ((ImageIcon) getValue(BASE_ICON)).getImage();
-            BufferedImage newIco = new BufferedImage(ICON_SIZE*3, ICON_SIZE, BufferedImage.TYPE_4BYTE_ABGR);
-            Graphics2D g = newIco.createGraphics();
-            g.drawImage(model.getLayersToUpload().isEmpty() ? upldDis : upld, ICON_SIZE*0, 0, ICON_SIZE, ICON_SIZE, null);
-            g.drawImage(model.getLayersToSave().isEmpty()   ? saveDis : save, ICON_SIZE*1, 0, ICON_SIZE, ICON_SIZE, null);
-            g.drawImage(base,                                                 ICON_SIZE*2, 0, ICON_SIZE, ICON_SIZE, null);
-            putValue(SMALL_ICON, new ImageIcon(newIco));
+            //Prepare images
+            Image iconsInRow[] = {
+                    model.getLayersToUpload().isEmpty() ? upldDis : upld,
+                    model.getLayersToSave().isEmpty()   ? saveDis : save,
+                    base};
+
+            //Join them in one image
+            Image newIcon = ImageProvider.joinImages(iconsInRow);
+            putValue(SMALL_ICON, new ImageIcon(newIcon));
         }
 
         @Override
Index: src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java
===================================================================
--- src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java	(revision 10368)
+++ src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java	(working copy)
@@ -258,7 +258,7 @@
         CancelAction() {
             putValue(Action.SHORT_DESCRIPTION, tr("Cancel uploading"));
             putValue(Action.NAME, tr("Cancel"));
-            new ImageProvider("cancel").getResource().getImageIcon(this);
+            new ImageProvider("cancel").getResource().attachImageIcon(this);
             getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW)
             .put(KeyStroke.getKeyStroke("ESCAPE"), "ESCAPE");
             getRootPane().getActionMap().put("ESCAPE", this);
@@ -276,7 +276,7 @@
         ContinueAction() {
             putValue(Action.SHORT_DESCRIPTION, tr("Continue uploading"));
             putValue(Action.NAME, tr("Continue"));
-            new ImageProvider("upload").getResource().getImageIcon(this);
+            new ImageProvider("upload").getResource().attachImageIcon(this);
             updateEnabledState();
         }
 
Index: src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java
===================================================================
--- src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java	(revision 10368)
+++ src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java	(working copy)
@@ -324,7 +324,7 @@
     class RunAuthorisationAction extends AbstractAction implements DocumentListener {
         RunAuthorisationAction() {
             putValue(NAME, tr("Authorize now"));
-            new ImageProvider("oauth", "oauth-small").getResource().getImageIcon(this);
+            new ImageProvider("oauth", "oauth-small").getResource().attachImageIcon(this);
             putValue(SHORT_DESCRIPTION, tr("Click to redirect you to the authorization form on the JOSM web site"));
             updateEnabledState();
         }
@@ -361,7 +361,7 @@
         BackAction() {
             putValue(NAME, tr("Back"));
             putValue(SHORT_DESCRIPTION, tr("Run the automatic authorization steps again"));
-            new ImageProvider("dialogs", "previous").getResource().getImageIcon(this);
+            new ImageProvider("dialogs", "previous").getResource().attachImageIcon(this);
         }
 
         @Override
@@ -376,7 +376,7 @@
     class TestAccessTokenAction extends AbstractAction {
         TestAccessTokenAction() {
             putValue(NAME, tr("Test Access Token"));
-            new ImageProvider("logo").getResource().getImageIcon(this);
+            new ImageProvider("logo").getResource().attachImageIcon(this);
         }
 
         @Override
Index: src/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java
===================================================================
--- src/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java	(revision 10368)
+++ src/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java	(working copy)
@@ -222,7 +222,7 @@
     class TestAccessTokenAction extends AbstractAction implements PropertyChangeListener {
         TestAccessTokenAction() {
             putValue(NAME, tr("Test Access Token"));
-            new ImageProvider("oauth", "oauth-small").getResource().getImageIcon(this);
+            new ImageProvider("oauth", "oauth-small").getResource().attachImageIcon(this);
             putValue(SHORT_DESCRIPTION, tr("Click to test the Access Token"));
             updateEnabledState();
         }
Index: src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java
===================================================================
--- src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java	(revision 10368)
+++ src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java	(working copy)
@@ -350,7 +350,7 @@
          */
         CancelAction() {
             putValue(NAME, tr("Cancel"));
-            new ImageProvider("cancel").getResource().getImageIcon(this);
+            new ImageProvider("cancel").getResource().attachImageIcon(this);
             putValue(SHORT_DESCRIPTION, tr("Close the dialog and cancel authorization"));
         }
 
@@ -372,7 +372,7 @@
          */
         AcceptAccessTokenAction() {
             putValue(NAME, tr("Accept Access Token"));
-            new ImageProvider("ok").getResource().getImageIcon(this);
+            new ImageProvider("ok").getResource().attachImageIcon(this);
             putValue(SHORT_DESCRIPTION, tr("Close the dialog and accept the Access Token"));
             updateEnabledState(null);
         }
Index: src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUI.java
===================================================================
--- src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUI.java	(revision 10368)
+++ src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUI.java	(working copy)
@@ -291,7 +291,7 @@
             BackAction() {
                 putValue(NAME, tr("Back"));
                 putValue(SHORT_DESCRIPTION, tr("Go back to step 1/3"));
-                new ImageProvider("dialogs", "previous").getResource().getImageIcon(this);
+                new ImageProvider("dialogs", "previous").getResource().attachImageIcon(this);
             }
 
             @Override
@@ -367,7 +367,7 @@
             RestartAction() {
                 putValue(NAME, tr("Restart"));
                 putValue(SHORT_DESCRIPTION, tr("Go back to step 1/3"));
-                new ImageProvider("dialogs", "previous").getResource().getImageIcon(this);
+                new ImageProvider("dialogs", "previous").getResource().attachImageIcon(this);
             }
 
             @Override
@@ -388,7 +388,7 @@
 
         RetrieveRequestTokenAction() {
             putValue(NAME, tr("Retrieve Request Token"));
-            new ImageProvider("oauth", "oauth-small").getResource().getImageIcon(this);
+            new ImageProvider("oauth", "oauth-small").getResource().attachImageIcon(this);
             putValue(SHORT_DESCRIPTION, tr("Click to retrieve a Request Token"));
         }
 
@@ -424,7 +424,7 @@
 
         RetrieveAccessTokenAction() {
             putValue(NAME, tr("Retrieve Access Token"));
-            new ImageProvider("oauth", "oauth-small").getResource().getImageIcon(this);
+            new ImageProvider("oauth", "oauth-small").getResource().attachImageIcon(this);
             putValue(SHORT_DESCRIPTION, tr("Click to retrieve an Access Token"));
         }
 
@@ -461,7 +461,7 @@
 
         TestAccessTokenAction() {
             putValue(NAME, tr("Test Access Token"));
-            new ImageProvider("oauth", "oauth-small").getResource().getImageIcon(this);
+            new ImageProvider("oauth", "oauth-small").getResource().attachImageIcon(this);
             putValue(SHORT_DESCRIPTION, tr("Click to test the Access Token"));
         }
 
Index: src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java
===================================================================
--- src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java	(revision 10368)
+++ src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java	(working copy)
@@ -156,7 +156,7 @@
     class CancelAction extends AbstractAction {
         CancelAction() {
             putValue(NAME, tr("Cancel"));
-            new ImageProvider("cancel").getResource().getImageIcon(this);
+            new ImageProvider("cancel").getResource().attachImageIcon(this);
             putValue(SHORT_DESCRIPTION, tr("Close the preferences dialog and discard preference updates"));
         }
 
@@ -175,7 +175,7 @@
     class OKAction extends AbstractAction {
         OKAction() {
             putValue(NAME, tr("OK"));
-            new ImageProvider("ok").getResource().getImageIcon(this);
+            new ImageProvider("ok").getResource().attachImageIcon(this);
             putValue(SHORT_DESCRIPTION, tr("Save the preferences and close the dialog"));
         }
 
Index: src/org/openstreetmap/josm/gui/tagging/TagTable.java
===================================================================
--- src/org/openstreetmap/josm/gui/tagging/TagTable.java	(revision 10368)
+++ src/org/openstreetmap/josm/gui/tagging/TagTable.java	(working copy)
@@ -163,7 +163,7 @@
     class DeleteAction extends AbstractAction implements ListSelectionListener {
 
         DeleteAction() {
-            new ImageProvider("dialogs", "delete").getResource().getImageIcon(this);
+            new ImageProvider("dialogs", "delete").getResource().attachImageIcon(this);
             putValue(SHORT_DESCRIPTION, tr("Delete the selection in the tag table"));
             getSelectionModel().addListSelectionListener(this);
             getColumnModel().getSelectionModel().addListSelectionListener(this);
@@ -252,7 +252,7 @@
      */
     class AddAction extends AbstractAction implements PropertyChangeListener {
         AddAction() {
-            new ImageProvider("dialogs", "add").getResource().getImageIcon(this);
+            new ImageProvider("dialogs", "add").getResource().attachImageIcon(this);
             putValue(SHORT_DESCRIPTION, tr("Add a new tag"));
             TagTable.this.addPropertyChangeListener(this);
             updateEnabledState();
@@ -286,7 +286,7 @@
      */
     class PasteAction extends AbstractAction implements PropertyChangeListener {
         PasteAction() {
-            new ImageProvider("pastetags").getResource().getImageIcon(this);
+            new ImageProvider("pastetags").getResource().attachImageIcon(this);
             putValue(SHORT_DESCRIPTION, tr("Paste tags from buffer"));
             TagTable.this.addPropertyChangeListener(this);
             updateEnabledState();
Index: src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java
===================================================================
--- src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java	(revision 10368)
+++ src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java	(working copy)
@@ -191,7 +191,7 @@
                     GuiHelper.runInEDT(new Runnable() {
                         @Override
                         public void run() {
-                            result.getImageIcon(TaggingPreset.this);
+                            result.attachImageIcon(TaggingPreset.this);
                         }
                     });
                 } else {
Index: src/org/openstreetmap/josm/io/session/GenericSessionExporter.java
===================================================================
--- src/org/openstreetmap/josm/io/session/GenericSessionExporter.java	(revision 10368)
+++ src/org/openstreetmap/josm/io/session/GenericSessionExporter.java	(working copy)
@@ -73,7 +73,7 @@
          * Constructs a new {@code LayerSaveAction}.
          */
         LayerSaveAction() {
-            putValue(SMALL_ICON, new ImageProvider("save").setWidth(16).get());
+            putValue(SMALL_ICON, new ImageProvider("save").setSize(ImageProvider.ImageSizes.SMALLICON).get());
             putValue(SHORT_DESCRIPTION, ((AbstractModifiableLayer) layer).requiresSaveToFile() ?
                     tr("Layer contains unsaved data - save to file.") :
                     tr("Layer does not contain unsaved data."));
Index: src/org/openstreetmap/josm/tools/ImageProvider.java
===================================================================
--- src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 10368)
+++ src/org/openstreetmap/josm/tools/ImageProvider.java	(working copy)
@@ -53,7 +53,10 @@
 import javax.imageio.ImageReader;
 import javax.imageio.metadata.IIOMetadata;
 import javax.imageio.stream.ImageInputStream;
+import javax.swing.Icon;
 import javax.swing.ImageIcon;
+import javax.swing.JPanel;
+import javax.swing.UIManager;
 import javax.xml.bind.DatatypeConverter;
 
 import org.openstreetmap.josm.Main;
@@ -692,6 +695,41 @@
     }
 
     /**
+     * Get disabled (grayed out) icon.
+     *
+     * This method gets standard icon and uses default Swing functionality
+     * to make it look disabled by applying grayscaling filter.
+     *
+     * @return Icon in disabled state
+     * @since ???
+     */
+    public Icon getDisabledIcon() {
+        return UIManager.getLookAndFeel().getDisabledIcon(null, get());
+    }
+
+    /**
+     * Get disabled (grayed out) image.
+     *
+     * This method does the same as #getDisabledIcon()
+     * but returns instance of Image instead of Icon.
+     *
+     * @return Image in disabled state
+     * @since ???
+     */
+    public Image getDisabledImage() {
+        Icon disabledIcon = getDisabledIcon();
+        //Convert Icon to Image
+        if (disabledIcon instanceof ImageIcon) {
+            return ((ImageIcon) disabledIcon).getImage();
+        } else {
+            Image disabledImage = new BufferedImage(disabledIcon.getIconWidth(), disabledIcon.getIconHeight(), BufferedImage.TYPE_4BYTE_ABGR);
+            disabledIcon.paintIcon(new JPanel(), disabledImage.getGraphics(), 0, 0);
+            return disabledImage;
+        }
+    }
+
+
+    /**
      * Load an image with a given file name.
      *
      * @param subdir subdirectory the image lies in
@@ -1873,4 +1911,38 @@
             IMAGE_FETCHER.shutdown();
         }
     }
+
+    /**
+     * Join multiple images in one row.
+     *
+     * Generates new image where all "images" are layouted side by side.
+     *
+     * @param images array of images to be joined
+     * @return new Image with all images in a row
+     * @see SaveAndProceedAction.redrawIcon()
+     */
+    public static Image joinImages(Image[] images) {
+        int targetWidth = 0;
+        int targetHeight = 0;
+
+        //Calculate cumulative width and max height
+        for (Image img : images) {
+            targetWidth += img.getWidth(null);
+            targetHeight = Math.max(targetHeight, img.getHeight(null));
+        }
+
+        BufferedImage newIco = new BufferedImage(targetWidth, targetHeight, BufferedImage.TYPE_4BYTE_ABGR);
+        Graphics2D g = newIco.createGraphics();
+
+        //Draw all images in row
+        int x = 0;
+        for (Image img : images) {
+            int curWidth = img.getWidth(null);
+            int curHeight = img.getHeight(null);
+            g.drawImage(img, x, 0, curWidth, curHeight, null);
+            x += curWidth;
+        }
+
+        return newIco;
+    }
 }
Index: src/org/openstreetmap/josm/tools/ImageResource.java
===================================================================
--- src/org/openstreetmap/josm/tools/ImageResource.java	(revision 10368)
+++ src/org/openstreetmap/josm/tools/ImageResource.java	(working copy)
@@ -109,7 +109,7 @@
      * @param a The action for the icons
      * @since 7693
      */
-    public void getImageIcon(AbstractAction a) {
+    public void attachImageIcon(AbstractAction a) {
         Dimension iconDimension = ImageProvider.ImageSizes.SMALLICON.getImageDimension();
         ImageIcon icon = getImageIconBounded(iconDimension);
         a.putValue(Action.SMALL_ICON, icon);
@@ -126,8 +126,8 @@
      * @param addresource Adds an resource named "ImageResource" if <code>true</code>
      * @since 10356
      */
-    public void getImageIcon(AbstractAction a, boolean addresource) {
-        getImageIcon(a);
+    public void attachImageIcon(AbstractAction a, boolean addresource) {
+        attachImageIcon(a);
         if (addresource) {
             a.putValue("ImageResource", this);
         }
