[Freeciv-Dev] Re: (PR#12111) Xaw3d client startup problem(png problem)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12111 >
Vijay Kiran Kamuju wrote:
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=12111 >
>
> i am trying to make necessary changes to graphics.c,
>
> by writing a new function generate_palette a modified version of entire
> pngquant
>
> its quite a bit blown up, not completed, non working,etc
>
> I am also trying to create a separete file for gen_pal.[ch] a modified
> version of pngquant.[ch], so that al the functions of orig pngquant
> are encapsulated in one function,gen_palette
>
> i thing it would better to call the function as convpng_rgba2rgbap()
> or pngpalette_gen rather than gen_palette
I'd suggest instead changing the code to work natively with non-paletted
PNGs.
1. Find some GPLd code that loads a PNG image into a simple graphics
format (4-channels, 8-bits per channel, rowstride, etc.). I know Cairo
has such a utility function but it may not be GPL.
2. Once the image is loaded into this form, you can go over ALL the
colors to allocate them. Possibly this should only be done on paletted
displays (there's probably a way to query this in X; I know GTK has it
so you can probably just look in the GTK code).
3. Eventually masks with alpha can be supported as well.
-jason
|
|