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

Re: [pygame] .png saving



SDL itself only supports loading and saving BMPs:

http://www.libsdl.org/cgi/docwiki.cgi/SDL_20API

The SDL_image library supports many formats, but it only loads them:

http://jcatki.no-ip.org/SDL_image/SDL_image.html

SDL_image does link against libpng.  I have no idea why they don't
support saving the images as well, but they don't.

Richard


James Paige wrote:
> On Fri, Oct 26, 2007 at 06:01:48PM -0400, Richard Goedeken wrote:
>> That's because SDL itself will only load a PNG; not save one.  I have
>> some C code that I've written to save a PNG but it requires libpng -
>> probably pygame doesn't need any more dependencies.
>>
>> Richard
> 
> Wait a second... if it can read PNG, then it should already be linking 
> to libpng.
> 
> I seriously doubt that anyone who has read the PNG spec would be INSANE 
> enough to manually implement PNG reading (hard to implement full spec) 
> but not also implement PNG writing (easy because you only need to 
> implement a subset of the spec that matches the image you are writing)
> 
> Does that make sense?
> If it can read PNG it should be able to write PNG.
> 
> ---
> James
> 
>