Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2002:
[Freeciv-Dev] Re: PNG for freeciv
Home

[Freeciv-Dev] Re: PNG for freeciv

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Christian Knoke <chrisk@xxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: PNG for freeciv
From: Vasco Alexandre Da Silva Costa <vasc@xxxxxxxxxxxxxx>
Date: Fri, 1 Nov 2002 11:12:06 +0000 (WET)

On Fri, 1 Nov 2002, Christian Knoke wrote:

> On Thu, Oct 31, 2002 at 11:07:39PM -0500, baumans wrote:
> >
> > > Jason Dorje Short wrote:
> > >
> > > I also forgot to mention another "alternative":
> > >
> > > 5.  Find a way to use PNG directly with XAW.  This would be in all ways
> > > superior, but may not be possible.  Any advice would be greatly
> > appreciated.
> > It seems quite possible to me.  As for easy, I have no clue how x pixmaps
> > work, but it might be possible to read the png to a regular x pixmap in
> > freeciv (if we're lucky) in the file loading function, a relatively
> > unintrusive change.
>
> You could do this: convert all XPM's to PNG, making sure that all
> PNG's use the same palette (like XPM does); wrote your own PNG2XPM
> routine for the Xaw client and convert gfx at runtime into memory
> (not disk).
>
> This comes right out of my stomach. I have no real idea about
> png and xpm, but since these are lossless formats, it shouldn't
> be to hard to do that. Maybe just steal the code from a GNU program.
> If you write it yourself (in C), it will be quick, and you don't get
> additional dependencies.
>
> I think it is a good idea to reduce the volume of the distribution
> this way.

I have done PNG support for the Xaw client which only depends on libpng
and libz in the past. You will find the patches in the mailing-list archive:

http://lists.complete.org/freeciv-dev@xxxxxxxxxxx/2001/10/msg00797.html.gz

The problem is it does not support PNG files without a palette.
Since everyone doesn't seem to have a problem with that we can just use it.

---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa



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