Index: /applications/editors/josm/plugins/build.xml
===================================================================
--- /applications/editors/josm/plugins/build.xml	(revision 24717)
+++ /applications/editors/josm/plugins/build.xml	(revision 24718)
@@ -8,7 +8,4 @@
     <target name="dist" depends="compile">
         <mkdir dir="../dist"/>
-        <!-- must be before other plugins using it -->
-        <ant antfile="build.xml" target="dist" dir="remotecontrol"/>
-
         <ant antfile="build.xml" target="dist" dir="addrinterpolation"/>
         <ant antfile="build.xml" target="dist" dir="alignways"/>
@@ -31,5 +28,4 @@
         <ant antfile="build.xml" target="dist" dir="gpxfilter"/>
         <ant antfile="build.xml" target="dist" dir="graphview"/>
-        <ant antfile="build.xml" target="dist" dir="imagery"/>
         <ant antfile="build.xml" target="dist" dir="imagewaypoint"/>
         <ant antfile="build.xml" target="dist" dir="ImportImagePlugin"/>
@@ -58,5 +54,4 @@
         <ant antfile="build.xml" target="dist" dir="routing"/>
         <ant antfile="build.xml" target="dist" dir="simplifyarea"/>
-        <ant antfile="build.xml" target="dist" dir="slippymap"/>
         <ant antfile="build.xml" target="dist" dir="smed"/>
         <ant antfile="build.xml" target="dist" dir="smed_fw"/>
@@ -76,5 +71,4 @@
         <ant antfile="build.xml" target="dist" dir="waypoint_search"/>
         <ant antfile="build.xml" target="dist" dir="wayselector"/>
-        <ant antfile="build.xml" target="dist" dir="wmsplugin"/>
         <ant antfile="build.xml" target="dist" dir="wms-turbo-challenge2"/>
         <!-- behind wms plugin! -->
@@ -104,5 +98,4 @@
         <ant antfile="build.xml" target="clean" dir="gpxfilter"/>
         <ant antfile="build.xml" target="clean" dir="graphview"/>
-        <ant antfile="build.xml" target="clean" dir="imagery"/>
         <ant antfile="build.xml" target="clean" dir="imagewaypoint"/>
         <ant antfile="build.xml" target="clean" dir="ImportImagePlugin"/>
@@ -126,5 +119,4 @@
         <ant antfile="build.xml" target="clean" dir="plastic_laf"/>
         <ant antfile="build.xml" target="clean" dir="public_transport"/>
-        <ant antfile="build.xml" target="clean" dir="remotecontrol"/>
         <ant antfile="build.xml" target="clean" dir="restart"/>
         <ant antfile="build.xml" target="clean" dir="reverter"/>
@@ -134,5 +126,4 @@
         <ant antfile="build.xml" target="clean" dir="routing"/>
         <ant antfile="build.xml" target="clean" dir="simplifyarea"/>
-        <ant antfile="build.xml" target="clean" dir="slippymap"/>
         <ant antfile="build.xml" target="clean" dir="smed"/>
         <!--<ant antfile="build.xml" target="clean" dir="smed_bfw"/>-->
@@ -154,5 +145,4 @@
         <ant antfile="build.xml" target="clean" dir="waypoint_search"/>
         <ant antfile="build.xml" target="clean" dir="wayselector"/>
-        <ant antfile="build.xml" target="clean" dir="wmsplugin"/>
         <ant antfile="build.xml" target="clean" dir="wms-turbo-challenge2"/>
     </target>
Index: /applications/editors/josm/webgrabber/gnome-web-photo-fixed
===================================================================
--- /applications/editors/josm/webgrabber/gnome-web-photo-fixed	(revision 24718)
+++ /applications/editors/josm/webgrabber/gnome-web-photo-fixed	(revision 24718)
@@ -0,0 +1,3 @@
+#! /bin/bash
+
+gnome-web-photo --mode=photo --format=ppm "$1" /dev/stdout |pnmcrop -white |pnmtopng
Index: /applications/editors/josm/webgrabber/makefile
===================================================================
--- /applications/editors/josm/webgrabber/makefile	(revision 24718)
+++ /applications/editors/josm/webgrabber/makefile	(revision 24718)
@@ -0,0 +1,31 @@
+#!/usr/bin/make
+
+ifneq ($(windir),)
+MINGWPATH = C:\\PROGRA~1\\mingw\\bin\\
+QTPATH    = C:\\PROGRA~1\\qt\\
+
+CPP       = ${MINGWPATH}c++.exe
+MOC       = ${QTPATH}bin\\moc.exe
+RM        = del
+CFLAGS    = -W -O2 -I${QTPATH}include
+LDFLAGS   = -L${QTPATH}lib
+LDLIBS    = -lQtCore4 -lQtWebKit4 -lQtGui4 -lQtNetwork4
+else
+MOC       = moc
+#MOC       = /usr/share/qt4/bin/moc
+CPP       = gcc
+
+PACKAGES  = QtCore QtGui QtWebKit QtNetwork
+CFLAGS    = -W -O2 `pkg-config --cflags ${PACKAGES}`
+LDFLAGS   = `pkg-config --libs-only-L ${PACKAGES}`
+LDLIBS    = `pkg-config --libs-only-l ${PACKAGES}`
+endif
+
+webkit-image: webkit-image.cpp webkit-image.h
+	$(CPP) -o $@ $(CFLAGS) $(LDFLAGS) webkit-image.cpp $(LDLIBS)
+
+webkit-image.h: webkit-image.cpp
+	$(MOC) webkit-image.cpp >$@
+
+clean:
+	${RM} *.o webkit-image webkit-image.h
Index: /applications/editors/josm/webgrabber/webkit-image-gtk.c
===================================================================
--- /applications/editors/josm/webgrabber/webkit-image-gtk.c	(revision 24718)
+++ /applications/editors/josm/webgrabber/webkit-image-gtk.c	(revision 24718)
@@ -0,0 +1,57 @@
+/* There is no licence for this, I don't care what you do with it */
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <gio/gunixoutputstream.h>
+#include <webkit/webkit.h>
+
+#define WIDTH 2000
+
+/* compile with:
+ * gcc -o webkit-image-gtk webkit-image-gtk.c `pkg-config --cflags --libs webkit-1.0 gio-unix-2.0`
+ * Requires GTK+ 2.20 and WebKitGtk+ 1.1.1
+ */
+
+static void
+on_finished (WebKitWebView      *view,
+             WebKitWebFrame     *frame,
+             GtkOffscreenWindow *window)
+{
+	GdkPixbuf *pixbuf;
+	GOutputStream *stream;
+
+	pixbuf = gtk_offscreen_window_get_pixbuf (window);
+
+	stream = g_unix_output_stream_new (STDOUT_FILENO, TRUE);
+	gdk_pixbuf_save_to_stream (pixbuf, stream, "png", NULL, NULL, NULL);
+
+	exit (1);
+}
+
+int
+main (int    argc,
+      char **argv)
+{
+	GtkWidget *window;
+	GtkWidget *view;
+
+	if (argc != 2)
+		exit (20);
+
+	gtk_init (&argc, &argv);
+
+	window = gtk_offscreen_window_new ();
+
+	view = webkit_web_view_new ();
+	webkit_web_view_load_uri (WEBKIT_WEB_VIEW (view), argv[1]);
+	gtk_widget_set_size_request (view, WIDTH, WIDTH);
+	gtk_container_add (GTK_CONTAINER (window), view);
+
+	gtk_widget_show_all (window);
+
+	g_signal_connect (view, "load-finished",
+	                  G_CALLBACK (on_finished), window);
+
+	gtk_main ();
+	return 0;
+}
Index: /applications/editors/josm/webgrabber/webkit-image.cpp
===================================================================
--- /applications/editors/josm/webgrabber/webkit-image.cpp	(revision 24718)
+++ /applications/editors/josm/webgrabber/webkit-image.cpp	(revision 24718)
@@ -0,0 +1,159 @@
+#include <QtGui/QApplication>
+#include <QtGui/QPainter>
+#include <QtCore/QFile>
+#include <QtCore/QString>
+#include <QtCore/QUrl>
+#include <QtWebKit/QWebPage>
+#include <QtWebKit/QWebFrame>
+#include <QtNetwork/QNetworkProxy>
+#include <QtCore/QProcess>
+#if QT_VERSION >= 0x040500
+#include <QtGui/QDesktopServices>
+#include <QtNetwork/QNetworkDiskCache>
+#endif
+
+/* using mingw to set binary mode */
+#ifdef WIN32
+#include <io.h>
+#include <fcntl.h>
+#define BINARYSTDOUT setmode(fileno(stdout), O_BINARY);
+#else
+#define BINARYSTDOUT
+#endif
+
+class Save : public QObject
+{
+Q_OBJECT
+public:
+  Save(QWebPage *p) : page(p) {};
+
+public slots:
+  void loaded(bool ok)
+  {
+    if(ok)
+    {
+      page->setViewportSize(page->mainFrame()->contentsSize());
+      QImage im(page->viewportSize(), QImage::Format_ARGB32);
+      QPainter painter(&im);
+      page->mainFrame()->render(&painter);
+
+      QFile f;
+      BINARYSTDOUT
+      if(f.open(stdout, QIODevice::WriteOnly|QIODevice::Unbuffered))
+      {
+        if(!im.save(&f, "JPEG"))
+        {
+          im.save(&f, "PNG");
+        }
+      }
+    }
+    emit finish();
+  }
+signals:
+  void finish(void);
+
+private:
+  QWebPage * page;
+};
+
+#include "webkit-image.h"
+
+int main(int argc, char **argv)
+{
+  if(argc != 2)
+    return 20;
+  QString url = QString(argv[1]);
+
+  QApplication a(argc, argv);
+  QWebPage * page = new QWebPage();
+  Save * s = new Save(page);
+
+  QStringList environment = QProcess::systemEnvironment();
+  int idx = environment.indexOf(QRegExp("http_proxy=.*"));
+  if(idx != -1)
+  {
+    QString scheme = "http";   // default
+    QString proxyHost;
+
+    int proxyPort = 8080;
+    QStringList tmpList = environment.at(idx).split("=");
+
+#if QT_VERSION >= 0x040600  // Qt4.6: Use QUrl::fromUserInput
+    // set URL (and guess if proto scheme missing)
+    QUrl url (QUrl::fromUserInput(tmpList.at(1)));
+#else
+    // set URL
+    QUrl url (tmpList.at(1));
+#endif
+    if (url.isValid() && !url.host().isEmpty())
+    {
+      proxyHost = url.host();
+
+      if (url.port() != -1)
+        proxyPort = url.port();
+
+      if (!url.scheme().isEmpty())
+        scheme = url.scheme();
+
+      if (scheme == "http")   // we support only http
+      {
+        QNetworkProxy proxy;
+        proxy.setType(QNetworkProxy::HttpCachingProxy);
+        proxy.setHostName(proxyHost);
+        proxy.setPort(proxyPort);
+        if (!url.userName().isEmpty())
+          proxy.setUser(url.userName());
+        if (!url.password().isEmpty())
+          proxy.setPassword(url.password());
+        page->networkAccessManager()->setProxy(proxy);
+      }
+    }
+    else /* manual mode */
+    {
+      QStringList proto_host_port = tmpList.at(1).split("://");
+      QStringList host_port;
+      if (proto_host_port.size() == 2)  // string has proto
+      {
+        scheme = proto_host_port.at(0);
+        host_port = proto_host_port.at(1).split(":");
+      }
+      else  // no proto (or invalid format with several delimiters)
+      {
+        host_port = tmpList.at(1).split(":");
+      }
+      if (scheme == "http")   // we support only http
+      {
+        proxyHost = host_port.at(0);
+        if(host_port.size() == 2)
+        {
+          bool ok;
+          int port = host_port.at(1).toInt(&ok);
+          if(ok)
+            proxyPort = port;
+        }
+
+        QNetworkProxy proxy;
+        proxy.setType(QNetworkProxy::HttpCachingProxy);
+        proxy.setHostName(proxyHost);
+        proxy.setPort(proxyPort);
+        page->networkAccessManager()->setProxy(proxy);
+      }
+    }
+  }
+
+#if QT_VERSION >= 0x040500
+  QNetworkDiskCache *diskCache = new QNetworkDiskCache(page);
+  QString location = QDesktopServices::storageLocation(QDesktopServices::CacheLocation);
+  diskCache->setCacheDirectory(location);
+  page->networkAccessManager()->setCache(diskCache);
+#endif
+
+  QObject::connect(page, SIGNAL(loadFinished(bool)), s, SLOT(loaded(bool)));
+  QObject::connect(s, SIGNAL(finish(void)), &a, SLOT(quit()));
+  /* set some useful defaults for a webpage */
+  page->setViewportSize(QSize(1280,1024));
+  page->mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
+  page->mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);
+  page->mainFrame()->load (QUrl(url));
+  return a.exec();
+}
