Skip to content

Commit

Permalink
Update to SDL2_image v2.8.5
Browse files Browse the repository at this point in the history
  • Loading branch information
bradharding committed Feb 8, 2025
1 parent 1d314bd commit 59cff77
Show file tree
Hide file tree
Showing 35 changed files with 68 additions and 48 deletions.
1 change: 0 additions & 1 deletion SDL2_image-2.8.4/.git-hash

This file was deleted.

Binary file removed SDL2_image-2.8.4/lib/x64/SDL2_image.dll
Binary file not shown.
Binary file removed SDL2_image-2.8.4/lib/x86/SDL2_image.dll
Binary file not shown.
1 change: 1 addition & 0 deletions SDL2_image-2.8.5/.git-hash
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4b43195502643dec5b4929e9bea6e97165e6993c
18 changes: 18 additions & 0 deletions SDL2_image-2.8.4/CHANGES.txt → SDL2_image-2.8.5/CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
2.8.5:
* Handle WEBP animation composition

2.8.4:
* Fixed a regression in the last release with certain grayscale PNG images

2.8.3:
* Fixed handling of grayscale images with alpha

2.8.2:
* Fixed crash loading LBM images
* Automatically set the colorkey for indexed PNG images with transparency

2.8.1:
* Indexed PNG images with alpha have blending automatically enabled
* Fixed a crash in the 32-bit webp DLLs on Windows
* Fixed issue extracting the tar release archives on Linux

2.8.0:
* Added support for loading WEBP animations
* PNG images with a palette are loaded as SDL surfaces with a palette
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
Copyright (C) 1997-2025 Sam Lantinga <[email protected]>

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
SDL_image: An example image loading library for use with SDL
Copyright (C) 1997-2024 Sam Lantinga <[email protected]>
Copyright (C) 1997-2025 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down Expand Up @@ -43,7 +43,7 @@ extern "C" {
*/
#define SDL_IMAGE_MAJOR_VERSION 2
#define SDL_IMAGE_MINOR_VERSION 8
#define SDL_IMAGE_PATCHLEVEL 4
#define SDL_IMAGE_PATCHLEVEL 5

/**
* This macro can be used to fill a version structure with the compile-time
Expand All @@ -57,21 +57,22 @@ extern "C" {
}

#if SDL_IMAGE_MAJOR_VERSION < 3 && SDL_MAJOR_VERSION < 3

/**
* This is the version number macro for the current SDL_image version.
* This is the version number macro for the current SDL_image version.
*
* In versions higher than 2.9.0, the minor version overflows into
* the thousands digit: for example, 2.23.0 is encoded as 4300.
* This macro will not be available in SDL 3.x or SDL_image 3.x.
* In versions higher than 2.9.0, the minor version overflows into the
* thousands digit: for example, 2.23.0 is encoded as 4300. This macro will
* not be available in SDL 3.x or SDL_image 3.x.
*
* Deprecated, use SDL_IMAGE_VERSION_ATLEAST or SDL_IMAGE_VERSION instead.
* Deprecated, use SDL_IMAGE_VERSION_ATLEAST or SDL_IMAGE_VERSION instead.
*/
#define SDL_IMAGE_COMPILEDVERSION \
SDL_VERSIONNUM(SDL_IMAGE_MAJOR_VERSION, SDL_IMAGE_MINOR_VERSION, SDL_IMAGE_PATCHLEVEL)
#endif /* SDL_IMAGE_MAJOR_VERSION < 3 && SDL_MAJOR_VERSION < 3 */

/**
* This macro will evaluate to true if compiled with SDL_image at least X.Y.Z.
* This macro will evaluate to true if compiled with SDL_image at least X.Y.Z.
*/
#define SDL_IMAGE_VERSION_ATLEAST(X, Y, Z) \
((SDL_IMAGE_MAJOR_VERSION >= X) && \
Expand All @@ -84,14 +85,14 @@ extern "C" {
* it should NOT be used to fill a version structure, instead you should use
* the SDL_IMAGE_VERSION() macro.
*
* \returns SDL_image version
* \returns SDL_image version.
*/
extern DECLSPEC const SDL_version * SDLCALL IMG_Linked_Version(void);

/**
* Initialization flags
*/
typedef enum
typedef enum IMG_InitFlags
{
IMG_INIT_JPG = 0x00000001,
IMG_INIT_PNG = 0x00000002,
Expand Down Expand Up @@ -1271,7 +1272,7 @@ extern DECLSPEC int SDLCALL IMG_isWEBP(SDL_RWops *src);
* interface available here.
*
* \param src an SDL_RWops to load image data from.
* \returns SDL surface, or NULL on error
* \returns SDL surface, or NULL on error.
*
* \since This function is available since SDL_image 2.6.0.
*
Expand Down Expand Up @@ -1305,7 +1306,7 @@ extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadAVIF_RW(SDL_RWops *src);
* interface available here.
*
* \param src an SDL_RWops to load image data from.
* \returns SDL surface, or NULL on error
* \returns SDL surface, or NULL on error.
*
* \since This function is available since SDL_image 2.0.0.
*
Expand Down Expand Up @@ -1339,7 +1340,7 @@ extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadICO_RW(SDL_RWops *src);
* interface available here.
*
* \param src an SDL_RWops to load image data from.
* \returns SDL surface, or NULL on error
* \returns SDL surface, or NULL on error.
*
* \since This function is available since SDL_image 2.0.0.
*
Expand Down Expand Up @@ -1373,7 +1374,7 @@ extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadCUR_RW(SDL_RWops *src);
* interface available here.
*
* \param src an SDL_RWops to load image data from.
* \returns SDL surface, or NULL on error
* \returns SDL surface, or NULL on error.
*
* \since This function is available since SDL_image 2.0.0.
*
Expand Down Expand Up @@ -1407,7 +1408,7 @@ extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadBMP_RW(SDL_RWops *src);
* interface available here.
*
* \param src an SDL_RWops to load image data from.
* \returns SDL surface, or NULL on error
* \returns SDL surface, or NULL on error.
*
* \since This function is available since SDL_image 2.0.0.
*
Expand Down Expand Up @@ -1441,7 +1442,7 @@ extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadGIF_RW(SDL_RWops *src);
* interface available here.
*
* \param src an SDL_RWops to load image data from.
* \returns SDL surface, or NULL on error
* \returns SDL surface, or NULL on error.
*
* \since This function is available since SDL_image 2.0.0.
*
Expand Down Expand Up @@ -1475,7 +1476,7 @@ extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadJPG_RW(SDL_RWops *src);
* interface available here.
*
* \param src an SDL_RWops to load image data from.
* \returns SDL surface, or NULL on error
* \returns SDL surface, or NULL on error.
*
* \since This function is available since SDL_image 2.6.0.
*
Expand Down Expand Up @@ -1509,7 +1510,7 @@ extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadJXL_RW(SDL_RWops *src);
* interface available here.
*
* \param src an SDL_RWops to load image data from.
* \returns SDL surface, or NULL on error
* \returns SDL surface, or NULL on error.
*
* \since This function is available since SDL_image 2.0.0.
*
Expand Down Expand Up @@ -1543,7 +1544,7 @@ extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadLBM_RW(SDL_RWops *src);
* interface available here.
*
* \param src an SDL_RWops to load image data from.
* \returns SDL surface, or NULL on error
* \returns SDL surface, or NULL on error.
*
* \since This function is available since SDL_image 2.0.0.
*
Expand Down Expand Up @@ -1577,7 +1578,7 @@ extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadPCX_RW(SDL_RWops *src);
* interface available here.
*
* \param src an SDL_RWops to load image data from.
* \returns SDL surface, or NULL on error
* \returns SDL surface, or NULL on error.
*
* \since This function is available since SDL_image 2.0.0.
*
Expand Down Expand Up @@ -1611,7 +1612,7 @@ extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadPNG_RW(SDL_RWops *src);
* interface available here.
*
* \param src an SDL_RWops to load image data from.
* \returns SDL surface, or NULL on error
* \returns SDL surface, or NULL on error.
*
* \since This function is available since SDL_image 2.0.0.
*
Expand Down Expand Up @@ -1645,7 +1646,7 @@ extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadPNM_RW(SDL_RWops *src);
* interface available here.
*
* \param src an SDL_RWops to load image data from.
* \returns SDL surface, or NULL on error
* \returns SDL surface, or NULL on error.
*
* \since This function is available since SDL_image 2.0.2.
*
Expand Down Expand Up @@ -1679,7 +1680,7 @@ extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadSVG_RW(SDL_RWops *src);
* interface available here.
*
* \param src an SDL_RWops to load image data from.
* \returns SDL surface, or NULL on error
* \returns SDL surface, or NULL on error.
*
* \since This function is available since SDL_image 2.6.0.
*
Expand Down Expand Up @@ -1713,7 +1714,7 @@ extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadQOI_RW(SDL_RWops *src);
* interface available here.
*
* \param src an SDL_RWops to load image data from.
* \returns SDL surface, or NULL on error
* \returns SDL surface, or NULL on error.
*
* \since This function is available since SDL_image 2.0.0.
*
Expand Down Expand Up @@ -1747,7 +1748,7 @@ extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadTGA_RW(SDL_RWops *src);
* interface available here.
*
* \param src an SDL_RWops to load image data from.
* \returns SDL surface, or NULL on error
* \returns SDL surface, or NULL on error.
*
* \since This function is available since SDL_image 2.0.0.
*
Expand Down Expand Up @@ -1781,7 +1782,7 @@ extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadTIF_RW(SDL_RWops *src);
* interface available here.
*
* \param src an SDL_RWops to load image data from.
* \returns SDL surface, or NULL on error
* \returns SDL surface, or NULL on error.
*
* \since This function is available since SDL_image 2.0.0.
*
Expand Down Expand Up @@ -1815,7 +1816,7 @@ extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadXCF_RW(SDL_RWops *src);
* interface available here.
*
* \param src an SDL_RWops to load image data from.
* \returns SDL surface, or NULL on error
* \returns SDL surface, or NULL on error.
*
* \since This function is available since SDL_image 2.0.0.
*
Expand Down Expand Up @@ -1849,7 +1850,7 @@ extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadXPM_RW(SDL_RWops *src);
* interface available here.
*
* \param src an SDL_RWops to load image data from.
* \returns SDL surface, or NULL on error
* \returns SDL surface, or NULL on error.
*
* \since This function is available since SDL_image 2.0.0.
*
Expand Down Expand Up @@ -1883,7 +1884,7 @@ extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadXV_RW(SDL_RWops *src);
* interface available here.
*
* \param src an SDL_RWops to load image data from.
* \returns SDL surface, or NULL on error
* \returns SDL surface, or NULL on error.
*
* \since This function is available since SDL_image 2.0.0.
*
Expand Down Expand Up @@ -1972,9 +1973,9 @@ extern DECLSPEC SDL_Surface * SDLCALL IMG_ReadXPMFromArrayToRGB888(char **xpm);
*
* If the file already exists, it will be overwritten.
*
* \param surface the SDL surface to save
* \param surface the SDL surface to save.
* \param file path on the filesystem to write new file to.
* \returns 0 if successful, -1 on error
* \returns 0 if successful, -1 on error.
*
* \since This function is available since SDL_image 2.0.0.
*
Expand All @@ -1989,7 +1990,7 @@ extern DECLSPEC int SDLCALL IMG_SavePNG(SDL_Surface *surface, const char *file);
*
* If you just want to save to a filename, you can use IMG_SavePNG() instead.
*
* \param surface the SDL surface to save
* \param surface the SDL surface to save.
* \param dst the SDL_RWops to save the image data to.
* \returns 0 if successful, -1 on error.
*
Expand All @@ -2006,11 +2007,11 @@ extern DECLSPEC int SDLCALL IMG_SavePNG_RW(SDL_Surface *surface, SDL_RWops *dst,
*
* If the file already exists, it will be overwritten.
*
* \param surface the SDL surface to save
* \param surface the SDL surface to save.
* \param file path on the filesystem to write new file to.
* \param quality [0; 33] is Lowest quality, [34; 66] is Middle quality, [67;
* 100] is Highest quality
* \returns 0 if successful, -1 on error
* 100] is Highest quality.
* \returns 0 if successful, -1 on error.
*
* \since This function is available since SDL_image 2.0.2.
*
Expand All @@ -2025,7 +2026,7 @@ extern DECLSPEC int SDLCALL IMG_SaveJPG(SDL_Surface *surface, const char *file,
*
* If you just want to save to a filename, you can use IMG_SaveJPG() instead.
*
* \param surface the SDL surface to save
* \param surface the SDL surface to save.
* \param dst the SDL_RWops to save the image data to.
* \returns 0 if successful, -1 on error.
*
Expand All @@ -2038,10 +2039,11 @@ extern DECLSPEC int SDLCALL IMG_SaveJPG(SDL_Surface *surface, const char *file,
extern DECLSPEC int SDLCALL IMG_SaveJPG_RW(SDL_Surface *surface, SDL_RWops *dst, int freedst, int quality);

/**
* Animated image support
* Animated image support.
*
* Currently only animated GIFs are supported.
*/
typedef struct
typedef struct IMG_Animation
{
int w, h;
int count;
Expand Down
Binary file added SDL2_image-2.8.5/lib/x64/SDL2_image.dll
Binary file not shown.
Binary file not shown.
Binary file added SDL2_image-2.8.5/lib/x86/SDL2_image.dll
Binary file not shown.
Binary file not shown.
Binary file modified msvc/Debug/SDL2_image.dll
Binary file not shown.
Binary file modified msvc/Release/SDL2_image.dll
Binary file not shown.
16 changes: 8 additions & 8 deletions msvc/doomretro.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(ProjectDir)..\src;$(ProjectDir)..\SDL2-2.30.12\include;$(ProjectDir)..\SDL2_mixer-2.8.1\include;$(ProjectDir)..\SDL2_image-2.8.4\include</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)..\src;$(ProjectDir)..\SDL2-2.30.12\include;$(ProjectDir)..\SDL2_mixer-2.8.1\include;$(ProjectDir)..\SDL2_image-2.8.5\include</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
Expand All @@ -131,7 +131,7 @@
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<GenerateMapFile>false</GenerateMapFile>
<AdditionalLibraryDirectories>$(ProjectDir)..\SDL2-2.30.12\lib\x86;$(ProjectDir)..\SDL2_mixer-2.8.1\lib\x86;$(ProjectDir)..\SDL2_image-2.8.4\lib\x86</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(ProjectDir)..\SDL2-2.30.12\lib\x86;$(ProjectDir)..\SDL2_mixer-2.8.1\lib\x86;$(ProjectDir)..\SDL2_image-2.8.5\lib\x86</AdditionalLibraryDirectories>
</Link>
<ResourceCompile>
<SuppressStartupBanner>false</SuppressStartupBanner>
Expand All @@ -147,7 +147,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(ProjectDir)..\src;$(ProjectDir)..\SDL2-2.30.12\include;$(ProjectDir)..\SDL2_mixer-2.8.1\include;$(ProjectDir)..\SDL2_image-2.8.4\include</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)..\src;$(ProjectDir)..\SDL2-2.30.12\include;$(ProjectDir)..\SDL2_mixer-2.8.1\include;$(ProjectDir)..\SDL2_image-2.8.5\include</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
Expand All @@ -172,7 +172,7 @@
<DataExecutionPrevention>
</DataExecutionPrevention>
<GenerateMapFile>false</GenerateMapFile>
<AdditionalLibraryDirectories>$(ProjectDir)..\SDL2-2.30.12\lib\x64;$(ProjectDir)..\SDL2_mixer-2.8.1\lib\x64;$(ProjectDir)..\SDL2_image-2.8.4\lib\x64</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(ProjectDir)..\SDL2-2.30.12\lib\x64;$(ProjectDir)..\SDL2_mixer-2.8.1\lib\x64;$(ProjectDir)..\SDL2_image-2.8.5\lib\x64</AdditionalLibraryDirectories>
</Link>
<ResourceCompile>
<SuppressStartupBanner>false</SuppressStartupBanner>
Expand All @@ -189,7 +189,7 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>$(ProjectDir)..\src;$(ProjectDir)..\SDL2-2.30.12\include;$(ProjectDir)..\SDL2_mixer-2.8.1\include;$(ProjectDir)..\SDL2_image-2.8.4\include</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)..\src;$(ProjectDir)..\SDL2-2.30.12\include;$(ProjectDir)..\SDL2_mixer-2.8.1\include;$(ProjectDir)..\SDL2_image-2.8.5\include</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_BIND_TO_CURRENT_VCLIBS_VERSION=1;_MSC_PLATFORM_TOOLSET=$(PlatformToolsetVersion);WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
Expand Down Expand Up @@ -239,7 +239,7 @@
<EnableUAC>false</EnableUAC>
<GenerateMapFile>true</GenerateMapFile>
<MapExports>false</MapExports>
<AdditionalLibraryDirectories>$(ProjectDir)..\SDL2-2.30.12\lib\x86;$(ProjectDir)..\SDL2_mixer-2.8.1\lib\x86;$(ProjectDir)..\SDL2_image-2.8.4\lib\x86</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(ProjectDir)..\SDL2-2.30.12\lib\x86;$(ProjectDir)..\SDL2_mixer-2.8.1\lib\x86;$(ProjectDir)..\SDL2_image-2.8.5\lib\x86</AdditionalLibraryDirectories>
</Link>
<Manifest>
<AdditionalManifestFiles>..\src\doomretro.manifest</AdditionalManifestFiles>
Expand All @@ -256,7 +256,7 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>$(ProjectDir)..\src;$(ProjectDir)..\SDL2-2.30.12\include;$(ProjectDir)..\SDL2_mixer-2.8.1\include;$(ProjectDir)..\SDL2_image-2.8.4\include</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)..\src;$(ProjectDir)..\SDL2-2.30.12\include;$(ProjectDir)..\SDL2_mixer-2.8.1\include;$(ProjectDir)..\SDL2_image-2.8.5\include</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_BIND_TO_CURRENT_VCLIBS_VERSION=1;_MSC_PLATFORM_TOOLSET=$(PlatformToolsetVersion);WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
Expand Down Expand Up @@ -305,7 +305,7 @@
<EnableUAC>false</EnableUAC>
<GenerateMapFile>true</GenerateMapFile>
<MapExports>false</MapExports>
<AdditionalLibraryDirectories>$(ProjectDir)..\SDL2-2.30.12\lib\x64;$(ProjectDir)..\SDL2_mixer-2.8.1\lib\x64;$(ProjectDir)..\SDL2_image-2.8.4\lib\x64</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(ProjectDir)..\SDL2-2.30.12\lib\x64;$(ProjectDir)..\SDL2_mixer-2.8.1\lib\x64;$(ProjectDir)..\SDL2_image-2.8.5\lib\x64</AdditionalLibraryDirectories>
</Link>
<Manifest>
<AdditionalManifestFiles>..\src\doomretro.manifest</AdditionalManifestFiles>
Expand Down
Binary file modified msvc/x64/Debug/SDL2_image.dll
Binary file not shown.
Binary file modified msvc/x64/Release/SDL2_image.dll
Binary file not shown.

0 comments on commit 59cff77

Please sign in to comment.