![]() | Logo by Kicko (anonymous IP: 216.73.216.126,2408) | |||||||||||||
| ||||||||||||||
Audio (347) Datatype (51) Demo (204) Development (609) Document (24) Driver (98) Emulation (153) Game (1027) Graphics (510) Library (119) Network (236) Office (67) Utility (939) Video (71) Total files: 4455 Full index file Recent index file
Amigans.net Aminet IntuitionBase Hyperion Entertainment A-Eon Amiga Future
Support the site
|
SaveSurf: an example on how to save a SDL surface in PNG Copyright (C) 2006 Angelo "Encelo" Theodorou Info ---- A quick and dirty example on how to save a SDL surface (loaded with SDL_image) in a PNG image using libpng. It is *heavy* inspired by this post: http://www.libsdl.org/pipermail/sdl/2001-May/036068.html, written by Darren Grant in 2001 and meant to be a SDL_image patch. Requirements ------------ - libSDL - SDL_image - libpng Compiling --------- $gcc savesurf.c -o savesurf -lSDL -lSDL_image -lpng or $make Notes ----- This program is part of "Mars, Land of No Mercy" SDL examples, you can find other examples on http://marsnomercy.org/sdl_ex.php. The savescreen version shows how to make a screenshot of the screen blitting it first on an output surface, then saving it. | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright © 2004-2025 by Björn Hagström All Rights Reserved |