"Fossies" - the Fresh Open Source Software Archive

Member "netmapr-1.9c/savepng.h" (14 Dec 2009, 1876 Bytes) of package /linux/privat/old/netmapr-1.9c.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "savepng.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2   Based on zlib license - see http://www.gzip.org/zlib/zlib_license.html
    3 
    4   This software is provided 'as-is', without any express or implied
    5   warranty.  In no event will the authors be held liable for any damages
    6   arising from the use of this software.
    7 
    8   Permission is granted to anyone to use this software for any purpose,
    9   including commercial applications, and to alter it and redistribute it
   10   freely, subject to the following restrictions:
   11 
   12   1. The origin of this software must not be misrepresented; you must not
   13      claim that you wrote the original software. If you use this software
   14      in a product, an acknowledgment in the product documentation would be
   15      appreciated but is not required.
   16   2. Altered source versions must be plainly marked as such, and must not be
   17      misrepresented as being the original software.
   18   3. This notice may not be removed or altered from any source distribution.
   19 
   20   "Philip D. Bober" <wildfire1138@mchsi.com>
   21  */
   22 #ifndef __IMG_SAVETOPNG_H__
   23 #define __IMG_SAVETOPNG_H__
   24 
   25 /* #include <SDL/begin_code.h> */
   26 
   27 #ifdef __cplusplus
   28 extern "C" {
   29 #endif
   30 
   31 #define IMG_COMPRESS_OFF 0
   32 #define IMG_COMPRESS_MAX 9
   33 #define IMG_COMPRESS_DEFAULT -1
   34 
   35 /**
   36  * Takes a filename, a surface to save, and a compression level.  The
   37  * compression level can be 0(min) through 9(max), or -1(default).
   38  */
   39 DECLSPEC int SDLCALL    SavePNG(const char  *file,
   40                                     SDL_Surface *surf,
   41                                     int          compression);
   42 /**
   43  * Takes a SDL_RWops pointer, a surface to save, and a compression level.
   44  * compression can be 0(min) through 9(max), or -1(default).
   45  */
   46 DECLSPEC int SDLCALL SavePNG_RW(SDL_RWops   *src,
   47                                     SDL_Surface *surf,
   48                                     int          compression);
   49 #ifdef __cplusplus
   50 }
   51 #endif
   52 
   53 #endif/*__IMG_SAVETOPNG_H__*/
   54