Re: gdk_pixbuf::xpm_image_save patch



Hans Breuer <hans breuer org> writes:

> the attached patch adds the ability to save xpms with gdk-pixbuf.
> It also fixes some problems with the !USE_G_MODULE case and 
> finally with the win32 build. 
> 
> >From ChangeLog:
> 
> 2000-10-29  Hans Breuer  <Hans Breuer Org>
> 
> 	* io-xpm.c : implement (gdk_pixbuf__xpm_image_save).
> 	Added HAVE_UNISTD_H and HAVE_MKSTEMP conditions.
> 
> 	* gdk-pixbuf-io.c : add xpm->save to module functions.
> 	Fix all function prototype macros for self contained
> 	image handlers (!USE_G_MODULE). Files to save should
> 	be opened in binary mode.
> 
> 	* io-tiff.c : add header for win32 build
> 
> 	* test-gdk-pixbuf.c : add test case for load and save
> 	functions
> 
> 
> Would it be ok to commit these changes to cvs?

Hmm, it looks like you've done a lot of work here, so I feel
bad about saying this, but I don't think we should have
XPM saving.

The problem with saving XPMs is that XPM was never meant
as a full-color image format; it was meant as an image
format for limited palettes.

Saving a full-color image as an XPM without quantizing to
a small number of colors has a number of problems:

 - It is extremely inefficient
 - Some programs will die when presented with XPMs with
   more than 256 colors
 - Many programs tend to allocate a colormap cell for 
   XPM color, so the tendency is to eat the entire
   colormap on a pseudo-color display.

Plus XPM is a horribly inefficient format to begin with,
and I don't think we should be encouraging people to create
more XPM files.

Regards,
                                        Owen




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]