Re: [GD-DEVEL] GD2-File-Format Documentation

[email protected] (Pierre)
Newsgroups php.gd.devel
Message-ID <[email protected]>
Hi Dieter,

On Nov 13, 2007 5:49 PM, Dieter Guthmann <[email protected]> wrote:
> Hello there,
>
> is there a documentation of the GD2 file-format? Is the GD2 file-format
> stable or changing with every release of libgd?

It is stable and I don't think we will change something anytime soon.

> The documentation at <http://www.libgd.org/%22OldGdFileFormats%22> is
> veeeery small *ggg*.

I can only agree :)

> Originally I thought that libgd can write all the file-formats which it
> can read, but I was wrong :-(.
> There is only read-support for XPM which I considered first, but
> XPM-writing is not possible...

Adding write support for XPM should not be that hard. One question, is it
only about speed or do you also have a limitation about the dependencies?
like libpng.

> I need a fileformat with low
> compression-overhead (slow machine) but with acceptable file-size (at
> least <7MB better <5MB for a ~7Mpixel-File in color)... so I'm currently
> thinking about a GD2-support in my application...
> Which compression is used in gd2?

The same used in GIF, see the compress function in gd_gif_out.c, it is used
by gd_gd2.c.

By the way, we are working on adding new image formats for the gd
2.1.x serie. TGA,
BMP and tiff are in cvs. If it is useful, I can think about a write
mode for the TGA format.
It is a relatively simple format and uses RLE as compression (fast to
read and write but not
as good as the other compression method).

Gruß,
--Pierre
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.