[SDL] Creating image files from surfaces

Jonathan Dearborn grimfang4 at hotmail.com
Thu Dec 28 08:31:18 PST 2006


Hey,
 
You can use SDL_SaveBMP() if you don't mind large file sizes, but you may be able to adapt the source code from SFontMaker to save PNGs.  Run a Google search for sfontmaker and download the source.  It has the file "png_save.c".  Also, someone recently pointed me to a PNG saving function that I would share if asked.  I haven't spent any time comparing the two, but I'd assume they're very similar.
 
Jonathan Dearborn


Date: Wed, 27 Dec 2006 19:30:28 +0000From: e_byard at yahoo.co.ukTo: sdl at libsdl.orgSubject: [SDL] Creating image files from surfaces



Hi,Is there a simple way to create image files (say PNGs) from surfaces? I want to load a large surface, and make separate images from this surface, I guess creating a rect and moving around the large surface...ThanksEd

All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease of use." - PC Magazine
_________________________________________________________________
Try amazing new 3D maps
http://maps.live.com/?wip=51
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20061228/e364aeac/attachment.html 


More information about the SDL mailing list