Updated SDL_image

This commit is contained in:
pelya
2012-02-28 12:31:44 +02:00
parent eadfb0ab82
commit 996291e118
23 changed files with 387 additions and 1525 deletions

View File

@@ -1,23 +1,22 @@
/*
SDL_image: An example image loading library for use with SDL
Copyright (C) 1997-2009 Sam Lantinga
SDL_image: An example image loading library for use with SDL
Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
/*
@@ -150,7 +149,7 @@ SDL_Surface *IMG_LoadPNM_RW(SDL_RWops *src)
if(kind == PPM) {
/* 24-bit surface in R,G,B byte order */
surface = SDL_AllocSurface(SDL_SWSURFACE, width, height, 24,
surface = SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, 24,
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
0x000000ff, 0x0000ff00, 0x00ff0000,
#else
@@ -159,7 +158,7 @@ SDL_Surface *IMG_LoadPNM_RW(SDL_RWops *src)
0);
} else {
/* load PBM/PGM as 8-bit indexed images */
surface = SDL_AllocSurface(SDL_SWSURFACE, width, height, 8,
surface = SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, 8,
0, 0, 0, 0);
}
if ( surface == NULL )