[Freeciv-Dev] Re: loading compressed XPM files
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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.
> Anyway; I can live with not making this a mainline patch, if the set of
> users who this helps is pretty small.
We should have dumped XPM long ago. The Amiga client already uses PNG as
does the Win32 (gtk+) client. Were it not for our unwillingness to change
the requirements for the Xaw client this would have been done already.
---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa
|
|