[Xastir] PNG snapshots not delivering..

Curt, WE7U archer at eskimo.com
Wed Jan 5 13:40:59 EST 2005


On Wed, 5 Jan 2005, Tapio Sokura wrote:

> I was reading the thread about xastir snapshots and went ahead and tried
> to see if they work for me. Zoomed at to about 256 that I normally use
> (geotiff map) there were no problems. But when I zoomed in to about zoom
> 8, where I have a different map set (png/geo), I get this error printed
> on stderr:
>
> /usr/bin/convert: Not a XPM image file
> (/home/oh2kku/.xastir/tmp/snapshot.xpm).
> System call return error: convert: /home/oh2kku/.xastir/tmp/snapshot.xpm ->
> /home/oh2kku/.xastir/tmp/snapshot.png
>
> I can open the xpm file with gimp, but something is wrong with it, the
> image is not the same as I can see on the xastir screen. It looks like
> the resulting file has some kind of additional noise in it. And convert
> prints the same error as above when I tried. A sample faulty xpm created
> by xastir is at http://www.oh2kku.ham.fi/misc/snapshot.xpm (6 MB).
>
> I'm running Xastir from CVS, compiled a few hours ago on an FC1.

I'm not sure there's a whole heck of a lot we can do about that
short of handling every pixel ourselves.  We make one call to
XpmWriteFileFromPixmap() using our final pixmap that we have in
memory as the input (the same pixmap that we write to the Xastir
display).  The XPM call handles the whole thing from that point on.
If you're getting a bogus XPM file, it's the fault of the XPM
library in that case.  At least that's how it appears to me.

It's possible you're exercising a bug that doesn't happen often in
the XPM code due to your color depth or some other factor.  Perhaps
the XPM team doesn't know about it yet.

Another possibility is that our in-memory pixmap could be getting
corrupted after it gets written to the display but before you do the
snapshot, or that Xastir is updating the pixmap just as the snapshot
is being created.  I'd have to check, but unless another thread is
created for the XpmWriteFileFromPixmap() call to run in, I don't
think it's possible for Xastir to be doing the snapshot and updating
the pixmap at the same time.  It's all in the main thread.  It looks
like we spawn a new thread AFTER we create the xpm file.  The
"convert" command runs in the new thread.

--
Curt, WE7U.   APRS Client Comparisons: http://www.eskimo.com/~archer
"Lotto:    A tax on people who are bad at math." -- unknown
"Windows:  Microsoft's tax on computer illiterates." -- WE7U
"The world DOES revolve around me:  I picked the coordinate system!"



More information about the Xastir mailing list