Xastir has long had the problem that it will display jpeg images (through .geo
files) incorrectly if ImageMagick or GraphicsMagick have been compiled with
QuantumDepth=8.   They would display as completely black.

None of my systems (FreeBSD, Ubuntu 8.04) have the problem, so it took me a 
while to get around to looking into it.  I built a VirtualBox virtual machine
with Ubuntu 9.10 and dove in last night.  The issue was trivial, and amounted
to a single function call where there was an incorrect assumption of 
type-equivalence between a Quantum and the red/green/blue components of an 
XColor.  The function pixel_pack_bits was being called with Quantums as 
arguments.  When QuantumDepth was 8, these were up-cast to unsigned shorts,
which had 0 for the upper 8 bits and the value of the quantum for the lower
8 bits.  Thing is, pixel_pack_bits strips the upper 8 bits of the r,g, and b 
provided and packs them into a 24 bit quantity for the X display.  That
meant that it always returned 0x000000 for every pixel.

This problem was only present for images that were not color mapped.  GIF,
PNG, XBM, etc were not a problem, but jpg certainly were.

I just committed a fix for this.  As of today, CVS Xastir will work properly 
with images through ImageMagick or GraphicsMagick irrespective of 
QuantumDepth=16 or QuantumDepth=8.

I have not addressed the HDRI issue.  HDRI is considered "experimental" in
ImageMagick, and at this point Xastir does not compile with versions of IM
for which this experimental feature is turned onn.


On Tue, Nov 24, 2009 at 02:24:59PM -0800, we recorded a bogon-computron 
collision of the <[email protected]> flavor, containing:
> 
> Response from Hamish, for those that are following this thread.
> 
> ---------- Forwarded message ----------
> Date: Wed, 25 Nov 2009 09:06:48 +1100
> From: Hamish Moffatt <[email protected]>
> To: Tom Russo <[email protected]>
> Cc: Tony Hunt <[email protected]>,
>      Xastir - APRS client software discussion <[email protected]>
> Subject: Re: [Xastir] [OZAPRS] XASTIR - maps
> 
> On Tue, Nov 24, 2009 at 02:07:54PM -0700, Tom Russo wrote:
> > On Wed, Nov 25, 2009 at 07:29:36AM +1030, we recorded a bogon-computron 
> > collision of the <[email protected]> flavor, containing:
> >> So what would be the problem if Hamish compiled against ImageMagick instead
> >> of
> >> GraphicsMagick to make the deb packages ?
> >
> > So, what would be the problem with sweeping the dust under the rug?
> >
> > If the current version of the deb package for ImageMagick uses 
> > QuantumDepth=16
> > and does not have HDRI support enabled, then it would likely make the deb
> > package for Xastir work better for a while, until such time as the 
> > ImageMagick
> > package maintainer decides to make that package's options consistent with 
> > the
> > GraphicsMagick build.
> 
> The ImageMagick package also uses the default, which for IM is 16 (while
> for GM, the default is 8).
> 
> > It would probably be a reasonable temporary fix to the deb  package.
> 
> I have nearly finished this.
> 
> > I was speaking more generally of fixing Xastir in a more comprehensive
> > way for a more permanent fix for all systems (or at least a less temporary
> > fix, given the instability of *Magick's API and defaults).
> 
> That would be best from my POV.

-- 
Tom Russo    KM5VY   SAR502   DM64ux          http://www.swcp.com/~russo/
Tijeras, NM  QRPL#1592 K2#398  SOC#236        http://kevan.org/brain.cgi?DDTNM
  In some cultures what I do would be considered normal. 
                                  -- Ineffective daily affirmation 

_______________________________________________
Xastir mailing list
[email protected]
http://lists.xastir.org/cgi-bin/mailman/listinfo/xastir

Reply via email to