Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] Re: loading compressed XPM files
Home

[Freeciv-Dev] Re: loading compressed XPM files

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Vasco Alexandre Da Silva Costa <vasc@xxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: loading compressed XPM files
From: Andreas Kemnade <akemnade@xxxxxxxxxxx>
Date: Tue, 18 Sep 2001 12:40:13 +0200

Vasco Alexandre Da Silva Costa writes:
 > On Mon, 17 Sep 2001, Benoit Hudson wrote:
 > 
 > > On Mon, Sep 17, 2001 at 10:04:04PM +0200, Andreas Kemnade wrote:
 > > > Benoit Hudson writes:
 > > >  > On Mon, Sep 17, 2001 at 10:16:49AM +0200, Raimar Falke wrote:
 > > >  > > So the user is lost if freeciv is shipped with compressed xpms and 
 > > > the
 > > >  > > user doesn't have libz?! We have to make libz a prerequisite.
 > > >  >
 > > >  > Ship with non-compressed; if --with-zlib is specified, compress.
 > > >
 > > > Don't make the thing so complex. gdk_imlib is quite intelligent. It can
 > > > search for the dynamic library which can handle the desired format. If it
 > > > does not find one, it tries to use ImageMagick.  You can even convert the
 > > > stuff to e.g. png. Then you can change the suffix back to xpm and freeciv
 > > > will load it (if imlib find its libimlib-png.so) You don't need to touch
 > > > the source! The only thing you might change is the list of supported gfx
 > > > formats in the gtk client.
 > > 
 > > Turns out gzipped XPM is smaller than png, and easier to create ; but
 > 
 > I sincerely doubt that. Are you certain you are using an 8-bit palette?
 > People often compress PNG's with a 16-bit or 24-bit palette and then find
 > them bigger than expected.
 > <http://www.libpng.org/pub/png/>
 > 
 > The trident tiles IIRC use 64 colours (6-bit palette).
 > The engels and hires tiles probably use 256 colours.
 > 
 > > unfortunately imlib can't load it (it says "assertion failed" a lot).
 > 
 > The Win32 version of the gtk+ client loads PNG files ok. I don't see why a
 > tested gtk+ client with support for PNG added to the available files types
 > shouldn't.
 > 

My gfx dir on Debian GNU/Linux (woody):

[andi /usr/local/share/freeciv]$ file hires/*.xpm
hires/cities.xpm:   TIFF image data, big-endian
hires/icons.xpm:    X pixmap image text
hires/nuke.xpm:     X pixmap image text
hires/terrain1.xpm: PNG image data, 640 x 480, 8-bit/color RGBA, non-interlaced
hires/terrain2.xpm: GIF image data, version 89a, 640 x 480
hires/units.xpm:    X pixmap image text

That works with unpatched cvs sources! Of course, the gif is not compressed.


Greetings
Andreas Kemnade


[Prev in Thread] Current Thread [Next in Thread]