code: @Nonnull
    private static Image makeBadgedImage(@Nonnull final Image original){
      final BufferedImage result = new BufferedImage(original.getWidth(null), original.getHeight(null), BufferedImage.TYPE_INT_ARGB);
      final Graphics2D gfx = result.createGraphics();
      try{
        gfx.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
        gfx.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
        gfx.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        gfx.drawImage(original, 0, 0, null);
        
        final Image badge = original.getWidth(null)>16 ? BADGE_ICON_16 : BADGE_ICON_10;
        
        gfx.drawImage(badge, result.getWidth()-badge.getWidth(null),result.getHeight()- badge.getHeight(null), null);
      }finally{
        gfx.dispose();
      }
      return result;
    }
docs: NOI18N