[josm-dev] Yahoo! Imagery through OpenLayers and wmsplugin

Dirk Stöcker openstreetmap at dstoecker.de
Mon Sep 15 10:43:06 BST 2008


On Mon, 15 Sep 2008, andrzej zaborowski wrote:

> Yes, resizeTo still works on the new gecko but it seems
> gnome-web-photo 0.5 cannot know what the final width is and needs to
> assume some default fixed amount, gnome-web-photo --help gives this:
>
>  -w, --width=W             The desired width of the image (default: 1024)
>
> and the resulting .png's are always 1024px wide by default, the yahoo
> image is aligned to left and the rest of the png is filled with white.

I use following script to workaround that problem, as using width 
parameter does not work due to unknown width. The script requires NetPBM 
to be installed.

---
#! /bin/bash

gnome-web-photo --mode=photo --format=ppm "$1" /dev/stdout |pnmcrop -white |pnmtopng
---

Another solution could be to use a different HTML page, which instead of 
generating the image returns the image width. When this page is read, the 
-w argument can be used. Maybe lynx, w3m or even internal HTML of Java can 
be used for this.

Ciao
-- 
http://www.dstoecker.eu/ (PGP key available)




More information about the josm-dev mailing list