AminetAminet
Search:
84479 packages online
About
Recent
Browse
Search
Upload
Setup
Services

dev/src/sdlpngsavesurf-os4.lha

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:How to save an SDL surface as PNG
Author:Angelo "Encelo" Theodorou, AmigaOS 4.0 compile by Spot / Up Rough
Uploader:Varthall / Up Rough <varti02 hotpop com>
Type:dev/src
Architecture:ppc-amigaos >= 4.0.5
Date:2008-02-08
Download:http://aminet.net/dev/src/sdlpngsavesurf-os4.lha - View contents
Readme:http://aminet.net/dev/src/sdlpngsavesurf-os4.readme
Downloads:677

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.


Contents of dev/src/sdlpngsavesurf-os4.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                  459     790  58.1% -lh5- b37b Nov  5  2006 PNG_savesurf/Docs/README
[generic]               346210  711264  48.7% -lh5- 9732 Nov  7  2006 PNG_savesurf/savesurf
[generic]                  190     321  59.2% -lh5- 81a1 Oct 12  2006 PNG_savesurf/Source/Makefile
[generic]                  215     368  58.4% -lh5- 91b7 Nov  7  2006 PNG_savesurf/Source/Makefile.aos4
[generic]                 2082    5038  41.3% -lh5- 1bfd Nov  5  2006 PNG_savesurf/Source/savescreen.c
[generic]                 1783    4240  42.1% -lh5- a49b Oct 13  2006 PNG_savesurf/Source/savesurf.c
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         6 files  350939  722021  48.6%            Feb  8 06:29

Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>