ruby2d 0.11.3 → 0.12.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (221) hide show
  1. checksums.yaml +4 -4
  2. data/assets/{windows/glew → include/GL}/glew.h +26427 -23686
  3. data/assets/include/GLES2/gl2.h +656 -0
  4. data/assets/include/GLES2/gl2ext.h +3949 -0
  5. data/assets/include/GLES2/gl2ext_angle.h +701 -0
  6. data/assets/include/GLES2/gl2platform.h +27 -0
  7. data/assets/include/GLES3/gl3.h +1192 -0
  8. data/assets/include/GLES3/gl31.h +1507 -0
  9. data/assets/include/GLES3/gl32.h +1808 -0
  10. data/assets/include/GLES3/gl3platform.h +27 -0
  11. data/assets/include/KHR/khrplatform.h +290 -0
  12. data/assets/include/SDL2/SDL.h +1 -0
  13. data/assets/include/SDL2/SDL_assert.h +4 -2
  14. data/assets/include/SDL2/SDL_atomic.h +20 -0
  15. data/assets/include/SDL2/SDL_audio.h +40 -4
  16. data/assets/include/SDL2/SDL_blendmode.h +4 -6
  17. data/assets/include/SDL2/SDL_clipboard.h +47 -0
  18. data/assets/include/SDL2/SDL_config.h +6 -2
  19. data/assets/include/SDL2/SDL_config_android.h +2 -0
  20. data/assets/include/SDL2/SDL_config_emscripten.h +2 -0
  21. data/assets/include/SDL2/SDL_config_iphoneos.h +3 -1
  22. data/assets/include/SDL2/SDL_config_macosx.h +3 -6
  23. data/assets/include/SDL2/SDL_config_minimal.h +18 -11
  24. data/assets/include/SDL2/SDL_config_ngage.h +89 -0
  25. data/assets/include/SDL2/SDL_config_os2.h +5 -3
  26. data/assets/include/SDL2/SDL_config_pandora.h +1 -0
  27. data/assets/include/SDL2/SDL_config_windows.h +71 -45
  28. data/assets/include/SDL2/SDL_config_wingdk.h +253 -0
  29. data/assets/include/SDL2/SDL_config_winrt.h +11 -49
  30. data/assets/include/SDL2/SDL_config_xbox.h +235 -0
  31. data/assets/include/SDL2/SDL_cpuinfo.h +39 -4
  32. data/assets/include/SDL2/SDL_egl.h +59 -9
  33. data/assets/include/SDL2/SDL_endian.h +34 -3
  34. data/assets/include/SDL2/SDL_events.h +32 -1
  35. data/assets/include/SDL2/SDL_filesystem.h +5 -1
  36. data/assets/include/SDL2/SDL_gamecontroller.h +78 -5
  37. data/assets/include/SDL2/SDL_guid.h +100 -0
  38. data/assets/include/SDL2/SDL_hints.h +645 -43
  39. data/assets/include/SDL2/SDL_image.h +2045 -33
  40. data/assets/include/SDL2/SDL_joystick.h +127 -7
  41. data/assets/include/SDL2/SDL_keyboard.h +38 -1
  42. data/assets/include/SDL2/SDL_keycode.h +6 -1
  43. data/assets/include/SDL2/SDL_log.h +2 -2
  44. data/assets/include/SDL2/SDL_main.h +42 -2
  45. data/assets/include/SDL2/SDL_metal.h +2 -1
  46. data/assets/include/SDL2/SDL_mixer.h +2529 -396
  47. data/assets/include/SDL2/SDL_mouse.h +12 -1
  48. data/assets/include/SDL2/SDL_opengl.h +0 -51
  49. data/assets/include/SDL2/SDL_opengl_glext.h +2260 -231
  50. data/assets/include/SDL2/SDL_opengles2_gl2.h +374 -339
  51. data/assets/include/SDL2/SDL_opengles2_gl2ext.h +3479 -1496
  52. data/assets/include/SDL2/SDL_opengles2_gl2platform.h +6 -9
  53. data/assets/include/SDL2/SDL_opengles2_khrplatform.h +43 -14
  54. data/assets/include/SDL2/SDL_platform.h +32 -6
  55. data/assets/include/SDL2/SDL_rect.h +154 -2
  56. data/assets/include/SDL2/SDL_render.h +46 -17
  57. data/assets/include/SDL2/SDL_revision.h +4 -0
  58. data/assets/include/SDL2/SDL_rwops.h +1 -15
  59. data/assets/include/SDL2/SDL_scancode.h +46 -21
  60. data/assets/include/SDL2/SDL_sensor.h +24 -3
  61. data/assets/include/SDL2/SDL_stdinc.h +119 -8
  62. data/assets/include/SDL2/SDL_surface.h +3 -1
  63. data/assets/include/SDL2/SDL_system.h +66 -6
  64. data/assets/include/SDL2/SDL_syswm.h +2 -0
  65. data/assets/include/SDL2/SDL_test_common.h +1 -0
  66. data/assets/include/SDL2/SDL_test_font.h +90 -3
  67. data/assets/include/SDL2/SDL_thread.h +3 -3
  68. data/assets/include/SDL2/SDL_touch.h +8 -0
  69. data/assets/include/SDL2/SDL_ttf.h +2084 -155
  70. data/assets/include/SDL2/SDL_version.h +19 -3
  71. data/assets/include/SDL2/SDL_video.h +71 -9
  72. data/assets/include/SDL2/begin_code.h +4 -4
  73. data/assets/include/mrbconf.h +15 -17
  74. data/assets/include/mruby/array.h +8 -21
  75. data/assets/include/mruby/boxing_nan.h +115 -86
  76. data/assets/include/mruby/boxing_word.h +104 -78
  77. data/assets/include/mruby/common.h +6 -0
  78. data/assets/include/mruby/compile.h +3 -4
  79. data/assets/include/mruby/debug.h +4 -2
  80. data/assets/include/mruby/dump.h +5 -2
  81. data/assets/include/mruby/error.h +12 -2
  82. data/assets/include/mruby/gc.h +2 -0
  83. data/assets/include/mruby/hash.h +1 -3
  84. data/assets/include/mruby/irep.h +4 -4
  85. data/assets/include/mruby/numeric.h +21 -13
  86. data/assets/include/mruby/opcode.h +30 -0
  87. data/assets/include/mruby/ops.h +99 -101
  88. data/assets/include/mruby/presym/scanning.h +15 -9
  89. data/assets/include/mruby/proc.h +4 -2
  90. data/assets/include/mruby/string.h +3 -24
  91. data/assets/include/mruby/value.h +80 -40
  92. data/assets/include/mruby/variable.h +0 -15
  93. data/assets/include/mruby/version.h +5 -5
  94. data/assets/include/mruby.h +86 -16
  95. data/assets/macos/universal/bin/mrbc +0 -0
  96. data/assets/macos/universal/lib/libFLAC.a +0 -0
  97. data/assets/macos/universal/lib/libSDL2.a +0 -0
  98. data/assets/macos/universal/lib/libSDL2_image.a +0 -0
  99. data/assets/macos/universal/lib/libSDL2_mixer.a +0 -0
  100. data/assets/macos/universal/lib/libSDL2_ttf.a +0 -0
  101. data/assets/macos/universal/lib/libavif.a +0 -0
  102. data/assets/macos/universal/lib/libbrotlicommon-static.a +0 -0
  103. data/assets/macos/universal/lib/libbrotlidec-static.a +0 -0
  104. data/assets/macos/universal/lib/libfreetype.a +0 -0
  105. data/assets/macos/universal/lib/libgraphite2.a +0 -0
  106. data/assets/macos/universal/lib/libharfbuzz.a +0 -0
  107. data/assets/macos/universal/lib/libhwy.a +0 -0
  108. data/assets/macos/universal/lib/libjpeg.a +0 -0
  109. data/assets/macos/universal/lib/libjxl.a +0 -0
  110. data/assets/macos/universal/lib/libmodplug.a +0 -0
  111. data/assets/macos/universal/lib/libmpg123.a +0 -0
  112. data/assets/macos/universal/lib/libmruby.a +0 -0
  113. data/assets/macos/universal/lib/libogg.a +0 -0
  114. data/assets/macos/universal/lib/libpng.a +0 -0
  115. data/assets/macos/universal/lib/libtiff.a +0 -0
  116. data/assets/macos/universal/lib/libvorbis.a +0 -0
  117. data/assets/macos/universal/lib/libvorbisfile.a +0 -0
  118. data/assets/macos/universal/lib/libwebp.a +0 -0
  119. data/assets/macos/universal/lib/libzstd.a +0 -0
  120. data/assets/wasm/template.html +2 -1
  121. data/assets/windows/mingw-w64-ucrt-x86_64/bin/mrbc.exe +0 -0
  122. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libFLAC.a +0 -0
  123. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libLerc.a +0 -0
  124. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2.a +0 -0
  125. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2_image.a +0 -0
  126. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2_mixer.a +0 -0
  127. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2_ttf.a +0 -0
  128. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libbrotlicommon.a +0 -0
  129. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libbrotlidec.a +0 -0
  130. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libdeflate.a +0 -0
  131. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libfreetype.a +0 -0
  132. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libglew32.a +0 -0
  133. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libharfbuzz.a +0 -0
  134. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libhwy.a +0 -0
  135. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libjpeg.a +0 -0
  136. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libjxl.a +0 -0
  137. data/assets/windows/mingw-w64-ucrt-x86_64/lib/liblzma.a +0 -0
  138. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libmpg123.a +0 -0
  139. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libmruby.a +0 -0
  140. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libopus.a +0 -0
  141. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libpng.a +0 -0
  142. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libsndfile.a +0 -0
  143. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libssp.a +0 -0
  144. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libstdc++.a +0 -0
  145. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libtiff.a +0 -0
  146. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libwebp.a +0 -0
  147. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libz.a +0 -0
  148. data/assets/windows/mingw-w64-x86_64/bin/mrbc.exe +0 -0
  149. data/assets/windows/mingw-w64-x86_64/lib/libFLAC.a +0 -0
  150. data/assets/windows/mingw-w64-x86_64/lib/libLerc.a +0 -0
  151. data/assets/windows/mingw-w64-x86_64/lib/libSDL2.a +0 -0
  152. data/assets/windows/mingw-w64-x86_64/lib/libSDL2_image.a +0 -0
  153. data/assets/windows/mingw-w64-x86_64/lib/libSDL2_mixer.a +0 -0
  154. data/assets/windows/mingw-w64-x86_64/lib/libSDL2_ttf.a +0 -0
  155. data/assets/windows/mingw-w64-x86_64/lib/libbrotlicommon.a +0 -0
  156. data/assets/windows/mingw-w64-x86_64/lib/libbrotlidec.a +0 -0
  157. data/assets/windows/mingw-w64-x86_64/lib/libdeflate.a +0 -0
  158. data/assets/windows/mingw-w64-x86_64/lib/libfreetype.a +0 -0
  159. data/assets/windows/mingw-w64-x86_64/lib/libglew32.a +0 -0
  160. data/assets/windows/mingw-w64-x86_64/lib/libharfbuzz.a +0 -0
  161. data/assets/windows/mingw-w64-x86_64/lib/libhwy.a +0 -0
  162. data/assets/windows/mingw-w64-x86_64/lib/libjpeg.a +0 -0
  163. data/assets/windows/mingw-w64-x86_64/lib/libjxl.a +0 -0
  164. data/assets/windows/mingw-w64-x86_64/lib/liblzma.a +0 -0
  165. data/assets/windows/mingw-w64-x86_64/lib/libmpg123.a +0 -0
  166. data/assets/windows/mingw-w64-x86_64/lib/libmruby.a +0 -0
  167. data/assets/windows/mingw-w64-x86_64/lib/libopus.a +0 -0
  168. data/assets/windows/mingw-w64-x86_64/lib/libpng.a +0 -0
  169. data/assets/windows/mingw-w64-x86_64/lib/libsndfile.a +0 -0
  170. data/assets/windows/mingw-w64-x86_64/lib/libssp.a +0 -0
  171. data/assets/windows/mingw-w64-x86_64/lib/libstdc++.a +0 -0
  172. data/assets/windows/mingw-w64-x86_64/lib/libtiff.a +0 -0
  173. data/assets/windows/mingw-w64-x86_64/lib/libwebp.a +0 -0
  174. data/assets/windows/mingw-w64-x86_64/lib/libz.a +0 -0
  175. data/assets/windows/mingw-w64-x86_64/lib/libzstd.a +0 -0
  176. data/ext/ruby2d/canvas.c +540 -0
  177. data/ext/ruby2d/extconf.rb +33 -20
  178. data/ext/ruby2d/gl.c +3 -3
  179. data/ext/ruby2d/image.c +7 -7
  180. data/ext/ruby2d/ruby2d.c +741 -24
  181. data/ext/ruby2d/ruby2d.h +66 -3
  182. data/ext/ruby2d/sound.c +16 -2
  183. data/lib/ruby2d/canvas.rb +315 -0
  184. data/lib/ruby2d/circle.rb +30 -15
  185. data/lib/ruby2d/cli/build.rb +5 -3
  186. data/lib/ruby2d/cli/enable_console.rb +3 -1
  187. data/lib/ruby2d/color.rb +133 -77
  188. data/lib/ruby2d/core.rb +32 -0
  189. data/lib/ruby2d/dsl.rb +38 -32
  190. data/lib/ruby2d/exceptions.rb +2 -1
  191. data/lib/ruby2d/font.rb +97 -62
  192. data/lib/ruby2d/image.rb +48 -27
  193. data/lib/ruby2d/line.rb +84 -45
  194. data/lib/ruby2d/music.rb +33 -23
  195. data/lib/ruby2d/pixel.rb +10 -9
  196. data/lib/ruby2d/pixmap.rb +39 -0
  197. data/lib/ruby2d/pixmap_atlas.rb +56 -0
  198. data/lib/ruby2d/quad.rb +98 -49
  199. data/lib/ruby2d/rectangle.rb +35 -36
  200. data/lib/ruby2d/renderable.rb +7 -6
  201. data/lib/ruby2d/sound.rb +23 -17
  202. data/lib/ruby2d/sprite.rb +181 -140
  203. data/lib/ruby2d/square.rb +21 -20
  204. data/lib/ruby2d/text.rb +47 -19
  205. data/lib/ruby2d/texture.rb +13 -3
  206. data/lib/ruby2d/tileset.rb +97 -44
  207. data/lib/ruby2d/triangle.rb +91 -42
  208. data/lib/ruby2d/version.rb +3 -1
  209. data/lib/ruby2d/vertices.rb +81 -45
  210. data/lib/ruby2d/window.rb +508 -371
  211. data/lib/ruby2d.rb +11 -29
  212. metadata +66 -16
  213. data/assets/include/SDL2/SDL_config_psp.h +0 -165
  214. data/assets/include/SDL2/SDL_config_wiz.h +0 -154
  215. data/assets/include/glew.h +0 -23686
  216. data/assets/macos/universal/lib/libpng16.a +0 -0
  217. data/assets/windows/glew/README.md +0 -10
  218. data/assets/windows/glew/libglew32.a +0 -0
  219. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libpng16.a +0 -0
  220. data/assets/windows/mingw-w64-x86_64/lib/libpng16.a +0 -0
  221. data/lib/ruby2d/entity.rb +0 -17
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  SDL_image: An example image loading library for use with SDL
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -19,8 +19,13 @@
19
19
  3. This notice may not be removed or altered from any source distribution.
20
20
  */
21
21
 
22
- /* A simple library to load images of various formats as SDL surfaces */
23
-
22
+ /**
23
+ * \file SDL_image.h
24
+ *
25
+ * Header file for SDL_image library
26
+ *
27
+ * A simple library to load images of various formats as SDL surfaces
28
+ */
24
29
  #ifndef SDL_IMAGE_H_
25
30
  #define SDL_IMAGE_H_
26
31
 
@@ -33,13 +38,15 @@
33
38
  extern "C" {
34
39
  #endif
35
40
 
36
- /* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
37
- */
41
+ /**
42
+ * Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
43
+ */
38
44
  #define SDL_IMAGE_MAJOR_VERSION 2
39
- #define SDL_IMAGE_MINOR_VERSION 0
40
- #define SDL_IMAGE_PATCHLEVEL 5
45
+ #define SDL_IMAGE_MINOR_VERSION 6
46
+ #define SDL_IMAGE_PATCHLEVEL 2
41
47
 
42
- /* This macro can be used to fill a version structure with the compile-time
48
+ /**
49
+ * This macro can be used to fill a version structure with the compile-time
43
50
  * version of the SDL_image library.
44
51
  */
45
52
  #define SDL_IMAGE_VERSION(X) \
@@ -49,107 +56,2112 @@ extern "C" {
49
56
  (X)->patch = SDL_IMAGE_PATCHLEVEL; \
50
57
  }
51
58
 
59
+ #if SDL_IMAGE_MAJOR_VERSION < 3 && SDL_MAJOR_VERSION < 3
52
60
  /**
53
61
  * This is the version number macro for the current SDL_image version.
62
+ *
63
+ * In versions higher than 2.9.0, the minor version overflows into
64
+ * the thousands digit: for example, 2.23.0 is encoded as 4300.
65
+ * This macro will not be available in SDL 3.x or SDL_image 3.x.
66
+ *
67
+ * Deprecated, use SDL_IMAGE_VERSION_ATLEAST or SDL_IMAGE_VERSION instead.
54
68
  */
55
69
  #define SDL_IMAGE_COMPILEDVERSION \
56
70
  SDL_VERSIONNUM(SDL_IMAGE_MAJOR_VERSION, SDL_IMAGE_MINOR_VERSION, SDL_IMAGE_PATCHLEVEL)
71
+ #endif /* SDL_IMAGE_MAJOR_VERSION < 3 && SDL_MAJOR_VERSION < 3 */
57
72
 
58
73
  /**
59
74
  * This macro will evaluate to true if compiled with SDL_image at least X.Y.Z.
60
75
  */
61
76
  #define SDL_IMAGE_VERSION_ATLEAST(X, Y, Z) \
62
- (SDL_IMAGE_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))
77
+ ((SDL_IMAGE_MAJOR_VERSION >= X) && \
78
+ (SDL_IMAGE_MAJOR_VERSION > X || SDL_IMAGE_MINOR_VERSION >= Y) && \
79
+ (SDL_IMAGE_MAJOR_VERSION > X || SDL_IMAGE_MINOR_VERSION > Y || SDL_IMAGE_PATCHLEVEL >= Z))
63
80
 
64
- /* This function gets the version of the dynamically linked SDL_image library.
65
- it should NOT be used to fill a version structure, instead you should
66
- use the SDL_IMAGE_VERSION() macro.
81
+ /**
82
+ * This function gets the version of the dynamically linked SDL_image library.
83
+ *
84
+ * it should NOT be used to fill a version structure, instead you should use
85
+ * the SDL_IMAGE_VERSION() macro.
86
+ *
87
+ * \returns SDL_image version
67
88
  */
68
89
  extern DECLSPEC const SDL_version * SDLCALL IMG_Linked_Version(void);
69
90
 
91
+ /**
92
+ * Initialization flags
93
+ */
70
94
  typedef enum
71
95
  {
72
- IMG_INIT_JPG = 0x00000001,
73
- IMG_INIT_PNG = 0x00000002,
74
- IMG_INIT_TIF = 0x00000004,
75
- IMG_INIT_WEBP = 0x00000008
96
+ IMG_INIT_JPG = 0x00000001,
97
+ IMG_INIT_PNG = 0x00000002,
98
+ IMG_INIT_TIF = 0x00000004,
99
+ IMG_INIT_WEBP = 0x00000008,
100
+ IMG_INIT_JXL = 0x00000010,
101
+ IMG_INIT_AVIF = 0x00000020
76
102
  } IMG_InitFlags;
77
103
 
78
- /* Loads dynamic libraries and prepares them for use. Flags should be
79
- one or more flags from IMG_InitFlags OR'd together.
80
- It returns the flags successfully initialized, or 0 on failure.
104
+ /**
105
+ * Initialize SDL_image.
106
+ *
107
+ * This function loads dynamic libraries that SDL_image needs, and prepares
108
+ * them for use. This must be the first function you call in SDL_image, and if
109
+ * it fails you should not continue with the library.
110
+ *
111
+ * Flags should be one or more flags from IMG_InitFlags OR'd together. It
112
+ * returns the flags successfully initialized, or 0 on failure.
113
+ *
114
+ * Currently, these flags are:
115
+ *
116
+ * - `_INIT_JPG`
117
+ * - `_INIT_PNG`
118
+ * - `_INIT_TIF`
119
+ * - `_INIT_WEBP`
120
+ * - `_INIT_JXL`
121
+ * - `_INIT_AVIF`
122
+ *
123
+ * More flags may be added in a future SDL_image release.
124
+ *
125
+ * This function may need to load external shared libraries to support various
126
+ * codecs, which means this function can fail to initialize that support on an
127
+ * otherwise-reasonable system if the library isn't available; this is not
128
+ * just a question of exceptional circumstances like running out of memory at
129
+ * startup!
130
+ *
131
+ * Note that you may call this function more than once to initialize with
132
+ * additional flags. The return value will reflect both new flags that
133
+ * successfully initialized, and also include flags that had previously been
134
+ * initialized as well.
135
+ *
136
+ * As this will return previously-initialized flags, it's legal to call this
137
+ * with zero (no flags set). This is a safe no-op that can be used to query
138
+ * the current initialization state without changing it at all.
139
+ *
140
+ * Since this returns previously-initialized flags as well as new ones, and
141
+ * you can call this with zero, you should not check for a zero return value
142
+ * to determine an error condition. Instead, you should check to make sure all
143
+ * the flags you require are set in the return value. If you have a game with
144
+ * data in a specific format, this might be a fatal error. If you're a generic
145
+ * image displaying app, perhaps you are fine with only having JPG and PNG
146
+ * support and can live without WEBP, even if you request support for
147
+ * everything.
148
+ *
149
+ * Unlike other SDL satellite libraries, calls to IMG_Init do not stack; a
150
+ * single call to IMG_Quit() will deinitialize everything and does not have to
151
+ * be paired with a matching IMG_Init call. For that reason, it's considered
152
+ * best practices to have a single IMG_Init and IMG_Quit call in your program.
153
+ * While this isn't required, be aware of the risks of deviating from that
154
+ * behavior.
155
+ *
156
+ * After initializing SDL_image, the app may begin to load images into
157
+ * SDL_Surfaces or SDL_Textures.
158
+ *
159
+ * \param flags initialization flags, OR'd together.
160
+ * \returns all currently initialized flags.
161
+ *
162
+ * \since This function is available since SDL_image 2.0.0.
163
+ *
164
+ * \sa IMG_Quit
81
165
  */
82
166
  extern DECLSPEC int SDLCALL IMG_Init(int flags);
83
167
 
84
- /* Unloads libraries loaded with IMG_Init */
168
+ /**
169
+ * Deinitialize SDL_image.
170
+ *
171
+ * This should be the last function you call in SDL_image, after freeing all
172
+ * other resources. This will unload any shared libraries it is using for
173
+ * various codecs.
174
+ *
175
+ * After this call, a call to IMG_Init(0) will return 0 (no codecs loaded).
176
+ *
177
+ * You can safely call IMG_Init() to reload various codec support after this
178
+ * call.
179
+ *
180
+ * Unlike other SDL satellite libraries, calls to IMG_Init do not stack; a
181
+ * single call to IMG_Quit() will deinitialize everything and does not have to
182
+ * be paired with a matching IMG_Init call. For that reason, it's considered
183
+ * best practices to have a single IMG_Init and IMG_Quit call in your program.
184
+ * While this isn't required, be aware of the risks of deviating from that
185
+ * behavior.
186
+ *
187
+ * \since This function is available since SDL_image 2.0.0.
188
+ *
189
+ * \sa IMG_Init
190
+ */
85
191
  extern DECLSPEC void SDLCALL IMG_Quit(void);
86
192
 
87
- /* Load an image from an SDL data source.
88
- The 'type' may be one of: "BMP", "GIF", "PNG", etc.
89
-
90
- If the image format supports a transparent pixel, SDL will set the
91
- colorkey for the surface. You can enable RLE acceleration on the
92
- surface afterwards by calling:
93
- SDL_SetColorKey(image, SDL_RLEACCEL, image->format->colorkey);
193
+ /**
194
+ * Load an image from an SDL data source into a software surface.
195
+ *
196
+ * An SDL_Surface is a buffer of pixels in memory accessible by the CPU. Use
197
+ * this if you plan to hand the data to something else or manipulate it
198
+ * further in code.
199
+ *
200
+ * There are no guarantees about what format the new SDL_Surface data will be;
201
+ * in many cases, SDL_image will attempt to supply a surface that exactly
202
+ * matches the provided image, but in others it might have to convert (either
203
+ * because the image is in a format that SDL doesn't directly support or
204
+ * because it's compressed data that could reasonably uncompress to various
205
+ * formats and SDL_image had to pick one). You can inspect an SDL_Surface for
206
+ * its specifics, and use SDL_ConvertSurface to then migrate to any supported
207
+ * format.
208
+ *
209
+ * If the image format supports a transparent pixel, SDL will set the colorkey
210
+ * for the surface. You can enable RLE acceleration on the surface afterwards
211
+ * by calling: SDL_SetColorKey(image, SDL_RLEACCEL, image->format->colorkey);
212
+ *
213
+ * If `freesrc` is non-zero, the RWops will be closed before returning,
214
+ * whether this function succeeds or not. SDL_image reads everything it needs
215
+ * from the RWops during this call in any case.
216
+ *
217
+ * Even though this function accepts a file type, SDL_image may still try
218
+ * other decoders that are capable of detecting file type from the contents of
219
+ * the image data, but may rely on the caller-provided type string for formats
220
+ * that it cannot autodetect. If `type` is NULL, SDL_image will rely solely on
221
+ * its ability to guess the format.
222
+ *
223
+ * There is a separate function to read files from disk without having to deal
224
+ * with SDL_RWops: `IMG_Load("filename.jpg")` will call this function and
225
+ * manage those details for you, determining the file type from the filename's
226
+ * extension.
227
+ *
228
+ * There is also IMG_Load_RW(), which is equivalent to this function except
229
+ * that it will rely on SDL_image to determine what type of data it is
230
+ * loading, much like passing a NULL for type.
231
+ *
232
+ * If you are using SDL's 2D rendering API, there is an equivalent call to
233
+ * load images directly into an SDL_Texture for use by the GPU without using a
234
+ * software surface: call IMG_LoadTextureTyped_RW() instead.
235
+ *
236
+ * When done with the returned surface, the app should dispose of it with a
237
+ * call to SDL_FreeSurface().
238
+ *
239
+ * \param src an SDL_RWops that data will be read from.
240
+ * \param freesrc non-zero to close/free the SDL_RWops before returning, zero
241
+ * to leave it open.
242
+ * \param type a filename extension that represent this data ("BMP", "GIF",
243
+ * "PNG", etc).
244
+ * \returns a new SDL surface, or NULL on error.
245
+ *
246
+ * \since This function is available since SDL_image 2.0.0.
247
+ *
248
+ * \sa IMG_Load
249
+ * \sa IMG_Load_RW
250
+ * \sa SDL_FreeSurface
94
251
  */
95
252
  extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadTyped_RW(SDL_RWops *src, int freesrc, const char *type);
96
- /* Convenience functions */
253
+
254
+ /**
255
+ * Load an image from a filesystem path into a software surface.
256
+ *
257
+ * An SDL_Surface is a buffer of pixels in memory accessible by the CPU. Use
258
+ * this if you plan to hand the data to something else or manipulate it
259
+ * further in code.
260
+ *
261
+ * There are no guarantees about what format the new SDL_Surface data will be;
262
+ * in many cases, SDL_image will attempt to supply a surface that exactly
263
+ * matches the provided image, but in others it might have to convert (either
264
+ * because the image is in a format that SDL doesn't directly support or
265
+ * because it's compressed data that could reasonably uncompress to various
266
+ * formats and SDL_image had to pick one). You can inspect an SDL_Surface for
267
+ * its specifics, and use SDL_ConvertSurface to then migrate to any supported
268
+ * format.
269
+ *
270
+ * If the image format supports a transparent pixel, SDL will set the colorkey
271
+ * for the surface. You can enable RLE acceleration on the surface afterwards
272
+ * by calling: SDL_SetColorKey(image, SDL_RLEACCEL, image->format->colorkey);
273
+ *
274
+ * There is a separate function to read files from an SDL_RWops, if you need
275
+ * an i/o abstraction to provide data from anywhere instead of a simple
276
+ * filesystem read; that function is IMG_Load_RW().
277
+ *
278
+ * If you are using SDL's 2D rendering API, there is an equivalent call to
279
+ * load images directly into an SDL_Texture for use by the GPU without using a
280
+ * software surface: call IMG_LoadTexture() instead.
281
+ *
282
+ * When done with the returned surface, the app should dispose of it with a
283
+ * call to SDL_FreeSurface().
284
+ *
285
+ * \param file a path on the filesystem to load an image from.
286
+ * \returns a new SDL surface, or NULL on error.
287
+ *
288
+ * \since This function is available since SDL_image 2.0.0.
289
+ *
290
+ * \sa IMG_LoadTyped_RW
291
+ * \sa IMG_Load_RW
292
+ * \sa SDL_FreeSurface
293
+ */
97
294
  extern DECLSPEC SDL_Surface * SDLCALL IMG_Load(const char *file);
295
+
296
+ /**
297
+ * Load an image from an SDL data source into a software surface.
298
+ *
299
+ * An SDL_Surface is a buffer of pixels in memory accessible by the CPU. Use
300
+ * this if you plan to hand the data to something else or manipulate it
301
+ * further in code.
302
+ *
303
+ * There are no guarantees about what format the new SDL_Surface data will be;
304
+ * in many cases, SDL_image will attempt to supply a surface that exactly
305
+ * matches the provided image, but in others it might have to convert (either
306
+ * because the image is in a format that SDL doesn't directly support or
307
+ * because it's compressed data that could reasonably uncompress to various
308
+ * formats and SDL_image had to pick one). You can inspect an SDL_Surface for
309
+ * its specifics, and use SDL_ConvertSurface to then migrate to any supported
310
+ * format.
311
+ *
312
+ * If the image format supports a transparent pixel, SDL will set the colorkey
313
+ * for the surface. You can enable RLE acceleration on the surface afterwards
314
+ * by calling: SDL_SetColorKey(image, SDL_RLEACCEL, image->format->colorkey);
315
+ *
316
+ * If `freesrc` is non-zero, the RWops will be closed before returning,
317
+ * whether this function succeeds or not. SDL_image reads everything it needs
318
+ * from the RWops during this call in any case.
319
+ *
320
+ * There is a separate function to read files from disk without having to deal
321
+ * with SDL_RWops: `IMG_Load("filename.jpg")` will call this function and
322
+ * manage those details for you, determining the file type from the filename's
323
+ * extension.
324
+ *
325
+ * There is also IMG_LoadTyped_RW(), which is equivalent to this function
326
+ * except a file extension (like "BMP", "JPG", etc) can be specified, in case
327
+ * SDL_image cannot autodetect the file format.
328
+ *
329
+ * If you are using SDL's 2D rendering API, there is an equivalent call to
330
+ * load images directly into an SDL_Texture for use by the GPU without using a
331
+ * software surface: call IMG_LoadTexture_RW() instead.
332
+ *
333
+ * When done with the returned surface, the app should dispose of it with a
334
+ * call to SDL_FreeSurface().
335
+ *
336
+ * \param src an SDL_RWops that data will be read from.
337
+ * \param freesrc non-zero to close/free the SDL_RWops before returning, zero
338
+ * to leave it open.
339
+ * \returns a new SDL surface, or NULL on error.
340
+ *
341
+ * \since This function is available since SDL_image 2.0.0.
342
+ *
343
+ * \sa IMG_Load
344
+ * \sa IMG_LoadTyped_RW
345
+ * \sa SDL_FreeSurface
346
+ */
98
347
  extern DECLSPEC SDL_Surface * SDLCALL IMG_Load_RW(SDL_RWops *src, int freesrc);
99
348
 
100
349
  #if SDL_VERSION_ATLEAST(2,0,0)
101
- /* Load an image directly into a render texture.
350
+
351
+ /**
352
+ * Load an image from a filesystem path into a GPU texture.
353
+ *
354
+ * An SDL_Texture represents an image in GPU memory, usable by SDL's 2D Render
355
+ * API. This can be significantly more efficient than using a CPU-bound
356
+ * SDL_Surface if you don't need to manipulate the image directly after
357
+ * loading it.
358
+ *
359
+ * If the loaded image has transparency or a colorkey, a texture with an alpha
360
+ * channel will be created. Otherwise, SDL_image will attempt to create an
361
+ * SDL_Texture in the most format that most reasonably represents the image
362
+ * data (but in many cases, this will just end up being 32-bit RGB or 32-bit
363
+ * RGBA).
364
+ *
365
+ * There is a separate function to read files from an SDL_RWops, if you need
366
+ * an i/o abstraction to provide data from anywhere instead of a simple
367
+ * filesystem read; that function is IMG_LoadTexture_RW().
368
+ *
369
+ * If you would rather decode an image to an SDL_Surface (a buffer of pixels
370
+ * in CPU memory), call IMG_Load() instead.
371
+ *
372
+ * When done with the returned texture, the app should dispose of it with a
373
+ * call to SDL_DestroyTexture().
374
+ *
375
+ * \param renderer the SDL_Renderer to use to create the GPU texture.
376
+ * \param file a path on the filesystem to load an image from.
377
+ * \returns a new texture, or NULL on error.
378
+ *
379
+ * \since This function is available since SDL_image 2.0.0.
380
+ *
381
+ * \sa IMG_LoadTextureTyped_RW
382
+ * \sa IMG_LoadTexture_RW
383
+ * \sa SDL_DestroyTexture
102
384
  */
103
385
  extern DECLSPEC SDL_Texture * SDLCALL IMG_LoadTexture(SDL_Renderer *renderer, const char *file);
386
+
387
+ /**
388
+ * Load an image from an SDL data source into a GPU texture.
389
+ *
390
+ * An SDL_Texture represents an image in GPU memory, usable by SDL's 2D Render
391
+ * API. This can be significantly more efficient than using a CPU-bound
392
+ * SDL_Surface if you don't need to manipulate the image directly after
393
+ * loading it.
394
+ *
395
+ * If the loaded image has transparency or a colorkey, a texture with an alpha
396
+ * channel will be created. Otherwise, SDL_image will attempt to create an
397
+ * SDL_Texture in the most format that most reasonably represents the image
398
+ * data (but in many cases, this will just end up being 32-bit RGB or 32-bit
399
+ * RGBA).
400
+ *
401
+ * If `freesrc` is non-zero, the RWops will be closed before returning,
402
+ * whether this function succeeds or not. SDL_image reads everything it needs
403
+ * from the RWops during this call in any case.
404
+ *
405
+ * There is a separate function to read files from disk without having to deal
406
+ * with SDL_RWops: `IMG_LoadTexture(renderer, "filename.jpg")` will call this
407
+ * function and manage those details for you, determining the file type from
408
+ * the filename's extension.
409
+ *
410
+ * There is also IMG_LoadTextureTyped_RW(), which is equivalent to this
411
+ * function except a file extension (like "BMP", "JPG", etc) can be specified,
412
+ * in case SDL_image cannot autodetect the file format.
413
+ *
414
+ * If you would rather decode an image to an SDL_Surface (a buffer of pixels
415
+ * in CPU memory), call IMG_Load() instead.
416
+ *
417
+ * When done with the returned texture, the app should dispose of it with a
418
+ * call to SDL_DestroyTexture().
419
+ *
420
+ * \param renderer the SDL_Renderer to use to create the GPU texture.
421
+ * \param src an SDL_RWops that data will be read from.
422
+ * \param freesrc non-zero to close/free the SDL_RWops before returning, zero
423
+ * to leave it open.
424
+ * \returns a new texture, or NULL on error.
425
+ *
426
+ * \since This function is available since SDL_image 2.0.0.
427
+ *
428
+ * \sa IMG_LoadTexture
429
+ * \sa IMG_LoadTextureTyped_RW
430
+ * \sa SDL_DestroyTexture
431
+ */
104
432
  extern DECLSPEC SDL_Texture * SDLCALL IMG_LoadTexture_RW(SDL_Renderer *renderer, SDL_RWops *src, int freesrc);
433
+
434
+ /**
435
+ * Load an image from an SDL data source into a GPU texture.
436
+ *
437
+ * An SDL_Texture represents an image in GPU memory, usable by SDL's 2D Render
438
+ * API. This can be significantly more efficient than using a CPU-bound
439
+ * SDL_Surface if you don't need to manipulate the image directly after
440
+ * loading it.
441
+ *
442
+ * If the loaded image has transparency or a colorkey, a texture with an alpha
443
+ * channel will be created. Otherwise, SDL_image will attempt to create an
444
+ * SDL_Texture in the most format that most reasonably represents the image
445
+ * data (but in many cases, this will just end up being 32-bit RGB or 32-bit
446
+ * RGBA).
447
+ *
448
+ * If `freesrc` is non-zero, the RWops will be closed before returning,
449
+ * whether this function succeeds or not. SDL_image reads everything it needs
450
+ * from the RWops during this call in any case.
451
+ *
452
+ * Even though this function accepts a file type, SDL_image may still try
453
+ * other decoders that are capable of detecting file type from the contents of
454
+ * the image data, but may rely on the caller-provided type string for formats
455
+ * that it cannot autodetect. If `type` is NULL, SDL_image will rely solely on
456
+ * its ability to guess the format.
457
+ *
458
+ * There is a separate function to read files from disk without having to deal
459
+ * with SDL_RWops: `IMG_LoadTexture("filename.jpg")` will call this function
460
+ * and manage those details for you, determining the file type from the
461
+ * filename's extension.
462
+ *
463
+ * There is also IMG_LoadTexture_RW(), which is equivalent to this function
464
+ * except that it will rely on SDL_image to determine what type of data it is
465
+ * loading, much like passing a NULL for type.
466
+ *
467
+ * If you would rather decode an image to an SDL_Surface (a buffer of pixels
468
+ * in CPU memory), call IMG_LoadTyped_RW() instead.
469
+ *
470
+ * When done with the returned texture, the app should dispose of it with a
471
+ * call to SDL_DestroyTexture().
472
+ *
473
+ * \param renderer the SDL_Renderer to use to create the GPU texture.
474
+ * \param src an SDL_RWops that data will be read from.
475
+ * \param freesrc non-zero to close/free the SDL_RWops before returning, zero
476
+ * to leave it open.
477
+ * \param type a filename extension that represent this data ("BMP", "GIF",
478
+ * "PNG", etc).
479
+ * \returns a new texture, or NULL on error.
480
+ *
481
+ * \since This function is available since SDL_image 2.0.0.
482
+ *
483
+ * \sa IMG_LoadTexture
484
+ * \sa IMG_LoadTexture_RW
485
+ * \sa SDL_DestroyTexture
486
+ */
105
487
  extern DECLSPEC SDL_Texture * SDLCALL IMG_LoadTextureTyped_RW(SDL_Renderer *renderer, SDL_RWops *src, int freesrc, const char *type);
106
488
  #endif /* SDL 2.0 */
107
489
 
108
- /* Functions to detect a file type, given a seekable source */
490
+ /**
491
+ * Detect AVIF image data on a readable/seekable SDL_RWops.
492
+ *
493
+ * This function attempts to determine if a file is a given filetype, reading
494
+ * the least amount possible from the SDL_RWops (usually a few bytes).
495
+ *
496
+ * There is no distinction made between "not the filetype in question" and
497
+ * basic i/o errors.
498
+ *
499
+ * This function will always attempt to seek the RWops back to where it
500
+ * started when this function was called, but it will not report any errors in
501
+ * doing so, but assuming seeking works, this means you can immediately use
502
+ * this with a different IMG_isTYPE function, or load the image without
503
+ * further seeking.
504
+ *
505
+ * You do not need to call this function to load data; SDL_image can work to
506
+ * determine file type in many cases in its standard load functions.
507
+ *
508
+ * \param src a seekable/readable SDL_RWops to provide image data.
509
+ * \returns non-zero if this is AVIF data, zero otherwise.
510
+ *
511
+ * \since This function is available since SDL_image 2.6.0.
512
+ *
513
+ * \sa IMG_isAVIF
514
+ * \sa IMG_isICO
515
+ * \sa IMG_isCUR
516
+ * \sa IMG_isBMP
517
+ * \sa IMG_isGIF
518
+ * \sa IMG_isJPG
519
+ * \sa IMG_isJXL
520
+ * \sa IMG_isLBM
521
+ * \sa IMG_isPCX
522
+ * \sa IMG_isPNG
523
+ * \sa IMG_isPNM
524
+ * \sa IMG_isSVG
525
+ * \sa IMG_isQOI
526
+ * \sa IMG_isTIF
527
+ * \sa IMG_isXCF
528
+ * \sa IMG_isXPM
529
+ * \sa IMG_isXV
530
+ * \sa IMG_isWEBP
531
+ */
532
+ extern DECLSPEC int SDLCALL IMG_isAVIF(SDL_RWops *src);
533
+
534
+ /**
535
+ * Detect ICO image data on a readable/seekable SDL_RWops.
536
+ *
537
+ * This function attempts to determine if a file is a given filetype, reading
538
+ * the least amount possible from the SDL_RWops (usually a few bytes).
539
+ *
540
+ * There is no distinction made between "not the filetype in question" and
541
+ * basic i/o errors.
542
+ *
543
+ * This function will always attempt to seek the RWops back to where it
544
+ * started when this function was called, but it will not report any errors in
545
+ * doing so, but assuming seeking works, this means you can immediately use
546
+ * this with a different IMG_isTYPE function, or load the image without
547
+ * further seeking.
548
+ *
549
+ * You do not need to call this function to load data; SDL_image can work to
550
+ * determine file type in many cases in its standard load functions.
551
+ *
552
+ * \param src a seekable/readable SDL_RWops to provide image data.
553
+ * \returns non-zero if this is ICO data, zero otherwise.
554
+ *
555
+ * \since This function is available since SDL_image 2.0.0.
556
+ *
557
+ * \sa IMG_isAVIF
558
+ * \sa IMG_isCUR
559
+ * \sa IMG_isBMP
560
+ * \sa IMG_isGIF
561
+ * \sa IMG_isJPG
562
+ * \sa IMG_isJXL
563
+ * \sa IMG_isLBM
564
+ * \sa IMG_isPCX
565
+ * \sa IMG_isPNG
566
+ * \sa IMG_isPNM
567
+ * \sa IMG_isSVG
568
+ * \sa IMG_isQOI
569
+ * \sa IMG_isTIF
570
+ * \sa IMG_isXCF
571
+ * \sa IMG_isXPM
572
+ * \sa IMG_isXV
573
+ * \sa IMG_isWEBP
574
+ */
109
575
  extern DECLSPEC int SDLCALL IMG_isICO(SDL_RWops *src);
576
+
577
+ /**
578
+ * Detect CUR image data on a readable/seekable SDL_RWops.
579
+ *
580
+ * This function attempts to determine if a file is a given filetype, reading
581
+ * the least amount possible from the SDL_RWops (usually a few bytes).
582
+ *
583
+ * There is no distinction made between "not the filetype in question" and
584
+ * basic i/o errors.
585
+ *
586
+ * This function will always attempt to seek the RWops back to where it
587
+ * started when this function was called, but it will not report any errors in
588
+ * doing so, but assuming seeking works, this means you can immediately use
589
+ * this with a different IMG_isTYPE function, or load the image without
590
+ * further seeking.
591
+ *
592
+ * You do not need to call this function to load data; SDL_image can work to
593
+ * determine file type in many cases in its standard load functions.
594
+ *
595
+ * \param src a seekable/readable SDL_RWops to provide image data.
596
+ * \returns non-zero if this is CUR data, zero otherwise.
597
+ *
598
+ * \since This function is available since SDL_image 2.0.0.
599
+ *
600
+ * \sa IMG_isAVIF
601
+ * \sa IMG_isICO
602
+ * \sa IMG_isBMP
603
+ * \sa IMG_isGIF
604
+ * \sa IMG_isJPG
605
+ * \sa IMG_isJXL
606
+ * \sa IMG_isLBM
607
+ * \sa IMG_isPCX
608
+ * \sa IMG_isPNG
609
+ * \sa IMG_isPNM
610
+ * \sa IMG_isSVG
611
+ * \sa IMG_isQOI
612
+ * \sa IMG_isTIF
613
+ * \sa IMG_isXCF
614
+ * \sa IMG_isXPM
615
+ * \sa IMG_isXV
616
+ * \sa IMG_isWEBP
617
+ */
110
618
  extern DECLSPEC int SDLCALL IMG_isCUR(SDL_RWops *src);
619
+
620
+ /**
621
+ * Detect BMP image data on a readable/seekable SDL_RWops.
622
+ *
623
+ * This function attempts to determine if a file is a given filetype, reading
624
+ * the least amount possible from the SDL_RWops (usually a few bytes).
625
+ *
626
+ * There is no distinction made between "not the filetype in question" and
627
+ * basic i/o errors.
628
+ *
629
+ * This function will always attempt to seek the RWops back to where it
630
+ * started when this function was called, but it will not report any errors in
631
+ * doing so, but assuming seeking works, this means you can immediately use
632
+ * this with a different IMG_isTYPE function, or load the image without
633
+ * further seeking.
634
+ *
635
+ * You do not need to call this function to load data; SDL_image can work to
636
+ * determine file type in many cases in its standard load functions.
637
+ *
638
+ * \param src a seekable/readable SDL_RWops to provide image data.
639
+ * \returns non-zero if this is BMP data, zero otherwise.
640
+ *
641
+ * \since This function is available since SDL_image 2.0.0.
642
+ *
643
+ * \sa IMG_isAVIF
644
+ * \sa IMG_isICO
645
+ * \sa IMG_isCUR
646
+ * \sa IMG_isGIF
647
+ * \sa IMG_isJPG
648
+ * \sa IMG_isJXL
649
+ * \sa IMG_isLBM
650
+ * \sa IMG_isPCX
651
+ * \sa IMG_isPNG
652
+ * \sa IMG_isPNM
653
+ * \sa IMG_isSVG
654
+ * \sa IMG_isQOI
655
+ * \sa IMG_isTIF
656
+ * \sa IMG_isXCF
657
+ * \sa IMG_isXPM
658
+ * \sa IMG_isXV
659
+ * \sa IMG_isWEBP
660
+ */
111
661
  extern DECLSPEC int SDLCALL IMG_isBMP(SDL_RWops *src);
662
+
663
+ /**
664
+ * Detect GIF image data on a readable/seekable SDL_RWops.
665
+ *
666
+ * This function attempts to determine if a file is a given filetype, reading
667
+ * the least amount possible from the SDL_RWops (usually a few bytes).
668
+ *
669
+ * There is no distinction made between "not the filetype in question" and
670
+ * basic i/o errors.
671
+ *
672
+ * This function will always attempt to seek the RWops back to where it
673
+ * started when this function was called, but it will not report any errors in
674
+ * doing so, but assuming seeking works, this means you can immediately use
675
+ * this with a different IMG_isTYPE function, or load the image without
676
+ * further seeking.
677
+ *
678
+ * You do not need to call this function to load data; SDL_image can work to
679
+ * determine file type in many cases in its standard load functions.
680
+ *
681
+ * \param src a seekable/readable SDL_RWops to provide image data.
682
+ * \returns non-zero if this is GIF data, zero otherwise.
683
+ *
684
+ * \since This function is available since SDL_image 2.0.0.
685
+ *
686
+ * \sa IMG_isAVIF
687
+ * \sa IMG_isICO
688
+ * \sa IMG_isCUR
689
+ * \sa IMG_isBMP
690
+ * \sa IMG_isJPG
691
+ * \sa IMG_isJXL
692
+ * \sa IMG_isLBM
693
+ * \sa IMG_isPCX
694
+ * \sa IMG_isPNG
695
+ * \sa IMG_isPNM
696
+ * \sa IMG_isSVG
697
+ * \sa IMG_isQOI
698
+ * \sa IMG_isTIF
699
+ * \sa IMG_isXCF
700
+ * \sa IMG_isXPM
701
+ * \sa IMG_isXV
702
+ * \sa IMG_isWEBP
703
+ */
112
704
  extern DECLSPEC int SDLCALL IMG_isGIF(SDL_RWops *src);
705
+
706
+ /**
707
+ * Detect JPG image data on a readable/seekable SDL_RWops.
708
+ *
709
+ * This function attempts to determine if a file is a given filetype, reading
710
+ * the least amount possible from the SDL_RWops (usually a few bytes).
711
+ *
712
+ * There is no distinction made between "not the filetype in question" and
713
+ * basic i/o errors.
714
+ *
715
+ * This function will always attempt to seek the RWops back to where it
716
+ * started when this function was called, but it will not report any errors in
717
+ * doing so, but assuming seeking works, this means you can immediately use
718
+ * this with a different IMG_isTYPE function, or load the image without
719
+ * further seeking.
720
+ *
721
+ * You do not need to call this function to load data; SDL_image can work to
722
+ * determine file type in many cases in its standard load functions.
723
+ *
724
+ * \param src a seekable/readable SDL_RWops to provide image data.
725
+ * \returns non-zero if this is JPG data, zero otherwise.
726
+ *
727
+ * \since This function is available since SDL_image 2.0.0.
728
+ *
729
+ * \sa IMG_isAVIF
730
+ * \sa IMG_isICO
731
+ * \sa IMG_isCUR
732
+ * \sa IMG_isBMP
733
+ * \sa IMG_isGIF
734
+ * \sa IMG_isJXL
735
+ * \sa IMG_isLBM
736
+ * \sa IMG_isPCX
737
+ * \sa IMG_isPNG
738
+ * \sa IMG_isPNM
739
+ * \sa IMG_isSVG
740
+ * \sa IMG_isQOI
741
+ * \sa IMG_isTIF
742
+ * \sa IMG_isXCF
743
+ * \sa IMG_isXPM
744
+ * \sa IMG_isXV
745
+ * \sa IMG_isWEBP
746
+ */
113
747
  extern DECLSPEC int SDLCALL IMG_isJPG(SDL_RWops *src);
748
+
749
+ /**
750
+ * Detect JXL image data on a readable/seekable SDL_RWops.
751
+ *
752
+ * This function attempts to determine if a file is a given filetype, reading
753
+ * the least amount possible from the SDL_RWops (usually a few bytes).
754
+ *
755
+ * There is no distinction made between "not the filetype in question" and
756
+ * basic i/o errors.
757
+ *
758
+ * This function will always attempt to seek the RWops back to where it
759
+ * started when this function was called, but it will not report any errors in
760
+ * doing so, but assuming seeking works, this means you can immediately use
761
+ * this with a different IMG_isTYPE function, or load the image without
762
+ * further seeking.
763
+ *
764
+ * You do not need to call this function to load data; SDL_image can work to
765
+ * determine file type in many cases in its standard load functions.
766
+ *
767
+ * \param src a seekable/readable SDL_RWops to provide image data.
768
+ * \returns non-zero if this is JXL data, zero otherwise.
769
+ *
770
+ * \since This function is available since SDL_image 2.6.0.
771
+ *
772
+ * \sa IMG_isAVIF
773
+ * \sa IMG_isICO
774
+ * \sa IMG_isCUR
775
+ * \sa IMG_isBMP
776
+ * \sa IMG_isGIF
777
+ * \sa IMG_isJPG
778
+ * \sa IMG_isLBM
779
+ * \sa IMG_isPCX
780
+ * \sa IMG_isPNG
781
+ * \sa IMG_isPNM
782
+ * \sa IMG_isSVG
783
+ * \sa IMG_isQOI
784
+ * \sa IMG_isTIF
785
+ * \sa IMG_isXCF
786
+ * \sa IMG_isXPM
787
+ * \sa IMG_isXV
788
+ * \sa IMG_isWEBP
789
+ */
790
+ extern DECLSPEC int SDLCALL IMG_isJXL(SDL_RWops *src);
791
+
792
+ /**
793
+ * Detect LBM image data on a readable/seekable SDL_RWops.
794
+ *
795
+ * This function attempts to determine if a file is a given filetype, reading
796
+ * the least amount possible from the SDL_RWops (usually a few bytes).
797
+ *
798
+ * There is no distinction made between "not the filetype in question" and
799
+ * basic i/o errors.
800
+ *
801
+ * This function will always attempt to seek the RWops back to where it
802
+ * started when this function was called, but it will not report any errors in
803
+ * doing so, but assuming seeking works, this means you can immediately use
804
+ * this with a different IMG_isTYPE function, or load the image without
805
+ * further seeking.
806
+ *
807
+ * You do not need to call this function to load data; SDL_image can work to
808
+ * determine file type in many cases in its standard load functions.
809
+ *
810
+ * \param src a seekable/readable SDL_RWops to provide image data.
811
+ * \returns non-zero if this is LBM data, zero otherwise.
812
+ *
813
+ * \since This function is available since SDL_image 2.0.0.
814
+ *
815
+ * \sa IMG_isAVIF
816
+ * \sa IMG_isICO
817
+ * \sa IMG_isCUR
818
+ * \sa IMG_isBMP
819
+ * \sa IMG_isGIF
820
+ * \sa IMG_isJPG
821
+ * \sa IMG_isJXL
822
+ * \sa IMG_isPCX
823
+ * \sa IMG_isPNG
824
+ * \sa IMG_isPNM
825
+ * \sa IMG_isSVG
826
+ * \sa IMG_isQOI
827
+ * \sa IMG_isTIF
828
+ * \sa IMG_isXCF
829
+ * \sa IMG_isXPM
830
+ * \sa IMG_isXV
831
+ * \sa IMG_isWEBP
832
+ */
114
833
  extern DECLSPEC int SDLCALL IMG_isLBM(SDL_RWops *src);
834
+
835
+ /**
836
+ * Detect PCX image data on a readable/seekable SDL_RWops.
837
+ *
838
+ * This function attempts to determine if a file is a given filetype, reading
839
+ * the least amount possible from the SDL_RWops (usually a few bytes).
840
+ *
841
+ * There is no distinction made between "not the filetype in question" and
842
+ * basic i/o errors.
843
+ *
844
+ * This function will always attempt to seek the RWops back to where it
845
+ * started when this function was called, but it will not report any errors in
846
+ * doing so, but assuming seeking works, this means you can immediately use
847
+ * this with a different IMG_isTYPE function, or load the image without
848
+ * further seeking.
849
+ *
850
+ * You do not need to call this function to load data; SDL_image can work to
851
+ * determine file type in many cases in its standard load functions.
852
+ *
853
+ * \param src a seekable/readable SDL_RWops to provide image data.
854
+ * \returns non-zero if this is PCX data, zero otherwise.
855
+ *
856
+ * \since This function is available since SDL_image 2.0.0.
857
+ *
858
+ * \sa IMG_isAVIF
859
+ * \sa IMG_isICO
860
+ * \sa IMG_isCUR
861
+ * \sa IMG_isBMP
862
+ * \sa IMG_isGIF
863
+ * \sa IMG_isJPG
864
+ * \sa IMG_isJXL
865
+ * \sa IMG_isLBM
866
+ * \sa IMG_isPNG
867
+ * \sa IMG_isPNM
868
+ * \sa IMG_isSVG
869
+ * \sa IMG_isQOI
870
+ * \sa IMG_isTIF
871
+ * \sa IMG_isXCF
872
+ * \sa IMG_isXPM
873
+ * \sa IMG_isXV
874
+ * \sa IMG_isWEBP
875
+ */
115
876
  extern DECLSPEC int SDLCALL IMG_isPCX(SDL_RWops *src);
877
+
878
+ /**
879
+ * Detect PNG image data on a readable/seekable SDL_RWops.
880
+ *
881
+ * This function attempts to determine if a file is a given filetype, reading
882
+ * the least amount possible from the SDL_RWops (usually a few bytes).
883
+ *
884
+ * There is no distinction made between "not the filetype in question" and
885
+ * basic i/o errors.
886
+ *
887
+ * This function will always attempt to seek the RWops back to where it
888
+ * started when this function was called, but it will not report any errors in
889
+ * doing so, but assuming seeking works, this means you can immediately use
890
+ * this with a different IMG_isTYPE function, or load the image without
891
+ * further seeking.
892
+ *
893
+ * You do not need to call this function to load data; SDL_image can work to
894
+ * determine file type in many cases in its standard load functions.
895
+ *
896
+ * \param src a seekable/readable SDL_RWops to provide image data.
897
+ * \returns non-zero if this is PNG data, zero otherwise.
898
+ *
899
+ * \since This function is available since SDL_image 2.0.0.
900
+ *
901
+ * \sa IMG_isAVIF
902
+ * \sa IMG_isICO
903
+ * \sa IMG_isCUR
904
+ * \sa IMG_isBMP
905
+ * \sa IMG_isGIF
906
+ * \sa IMG_isJPG
907
+ * \sa IMG_isJXL
908
+ * \sa IMG_isLBM
909
+ * \sa IMG_isPCX
910
+ * \sa IMG_isPNM
911
+ * \sa IMG_isSVG
912
+ * \sa IMG_isQOI
913
+ * \sa IMG_isTIF
914
+ * \sa IMG_isXCF
915
+ * \sa IMG_isXPM
916
+ * \sa IMG_isXV
917
+ * \sa IMG_isWEBP
918
+ */
116
919
  extern DECLSPEC int SDLCALL IMG_isPNG(SDL_RWops *src);
920
+
921
+ /**
922
+ * Detect PNM image data on a readable/seekable SDL_RWops.
923
+ *
924
+ * This function attempts to determine if a file is a given filetype, reading
925
+ * the least amount possible from the SDL_RWops (usually a few bytes).
926
+ *
927
+ * There is no distinction made between "not the filetype in question" and
928
+ * basic i/o errors.
929
+ *
930
+ * This function will always attempt to seek the RWops back to where it
931
+ * started when this function was called, but it will not report any errors in
932
+ * doing so, but assuming seeking works, this means you can immediately use
933
+ * this with a different IMG_isTYPE function, or load the image without
934
+ * further seeking.
935
+ *
936
+ * You do not need to call this function to load data; SDL_image can work to
937
+ * determine file type in many cases in its standard load functions.
938
+ *
939
+ * \param src a seekable/readable SDL_RWops to provide image data.
940
+ * \returns non-zero if this is PNM data, zero otherwise.
941
+ *
942
+ * \since This function is available since SDL_image 2.0.0.
943
+ *
944
+ * \sa IMG_isAVIF
945
+ * \sa IMG_isICO
946
+ * \sa IMG_isCUR
947
+ * \sa IMG_isBMP
948
+ * \sa IMG_isGIF
949
+ * \sa IMG_isJPG
950
+ * \sa IMG_isJXL
951
+ * \sa IMG_isLBM
952
+ * \sa IMG_isPCX
953
+ * \sa IMG_isPNG
954
+ * \sa IMG_isSVG
955
+ * \sa IMG_isQOI
956
+ * \sa IMG_isTIF
957
+ * \sa IMG_isXCF
958
+ * \sa IMG_isXPM
959
+ * \sa IMG_isXV
960
+ * \sa IMG_isWEBP
961
+ */
117
962
  extern DECLSPEC int SDLCALL IMG_isPNM(SDL_RWops *src);
963
+
964
+ /**
965
+ * Detect SVG image data on a readable/seekable SDL_RWops.
966
+ *
967
+ * This function attempts to determine if a file is a given filetype, reading
968
+ * the least amount possible from the SDL_RWops (usually a few bytes).
969
+ *
970
+ * There is no distinction made between "not the filetype in question" and
971
+ * basic i/o errors.
972
+ *
973
+ * This function will always attempt to seek the RWops back to where it
974
+ * started when this function was called, but it will not report any errors in
975
+ * doing so, but assuming seeking works, this means you can immediately use
976
+ * this with a different IMG_isTYPE function, or load the image without
977
+ * further seeking.
978
+ *
979
+ * You do not need to call this function to load data; SDL_image can work to
980
+ * determine file type in many cases in its standard load functions.
981
+ *
982
+ * \param src a seekable/readable SDL_RWops to provide image data.
983
+ * \returns non-zero if this is SVG data, zero otherwise.
984
+ *
985
+ * \since This function is available since SDL_image 2.0.2.
986
+ *
987
+ * \sa IMG_isAVIF
988
+ * \sa IMG_isICO
989
+ * \sa IMG_isCUR
990
+ * \sa IMG_isBMP
991
+ * \sa IMG_isGIF
992
+ * \sa IMG_isJPG
993
+ * \sa IMG_isJXL
994
+ * \sa IMG_isLBM
995
+ * \sa IMG_isPCX
996
+ * \sa IMG_isPNG
997
+ * \sa IMG_isPNM
998
+ * \sa IMG_isQOI
999
+ * \sa IMG_isTIF
1000
+ * \sa IMG_isXCF
1001
+ * \sa IMG_isXPM
1002
+ * \sa IMG_isXV
1003
+ * \sa IMG_isWEBP
1004
+ */
118
1005
  extern DECLSPEC int SDLCALL IMG_isSVG(SDL_RWops *src);
1006
+
1007
+ /**
1008
+ * Detect QOI image data on a readable/seekable SDL_RWops.
1009
+ *
1010
+ * This function attempts to determine if a file is a given filetype, reading
1011
+ * the least amount possible from the SDL_RWops (usually a few bytes).
1012
+ *
1013
+ * There is no distinction made between "not the filetype in question" and
1014
+ * basic i/o errors.
1015
+ *
1016
+ * This function will always attempt to seek the RWops back to where it
1017
+ * started when this function was called, but it will not report any errors in
1018
+ * doing so, but assuming seeking works, this means you can immediately use
1019
+ * this with a different IMG_isTYPE function, or load the image without
1020
+ * further seeking.
1021
+ *
1022
+ * You do not need to call this function to load data; SDL_image can work to
1023
+ * determine file type in many cases in its standard load functions.
1024
+ *
1025
+ * \param src a seekable/readable SDL_RWops to provide image data.
1026
+ * \returns non-zero if this is QOI data, zero otherwise.
1027
+ *
1028
+ * \since This function is available since SDL_image 2.6.0.
1029
+ *
1030
+ * \sa IMG_isAVIF
1031
+ * \sa IMG_isICO
1032
+ * \sa IMG_isCUR
1033
+ * \sa IMG_isBMP
1034
+ * \sa IMG_isGIF
1035
+ * \sa IMG_isJPG
1036
+ * \sa IMG_isJXL
1037
+ * \sa IMG_isLBM
1038
+ * \sa IMG_isPCX
1039
+ * \sa IMG_isPNG
1040
+ * \sa IMG_isPNM
1041
+ * \sa IMG_isSVG
1042
+ * \sa IMG_isTIF
1043
+ * \sa IMG_isXCF
1044
+ * \sa IMG_isXPM
1045
+ * \sa IMG_isXV
1046
+ * \sa IMG_isWEBP
1047
+ */
1048
+ extern DECLSPEC int SDLCALL IMG_isQOI(SDL_RWops *src);
1049
+
1050
+ /**
1051
+ * Detect TIFF image data on a readable/seekable SDL_RWops.
1052
+ *
1053
+ * This function attempts to determine if a file is a given filetype, reading
1054
+ * the least amount possible from the SDL_RWops (usually a few bytes).
1055
+ *
1056
+ * There is no distinction made between "not the filetype in question" and
1057
+ * basic i/o errors.
1058
+ *
1059
+ * This function will always attempt to seek the RWops back to where it
1060
+ * started when this function was called, but it will not report any errors in
1061
+ * doing so, but assuming seeking works, this means you can immediately use
1062
+ * this with a different IMG_isTYPE function, or load the image without
1063
+ * further seeking.
1064
+ *
1065
+ * You do not need to call this function to load data; SDL_image can work to
1066
+ * determine file type in many cases in its standard load functions.
1067
+ *
1068
+ * \param src a seekable/readable SDL_RWops to provide image data.
1069
+ * \returns non-zero if this is TIFF data, zero otherwise.
1070
+ *
1071
+ * \since This function is available since SDL_image 2.0.0.
1072
+ *
1073
+ * \sa IMG_isAVIF
1074
+ * \sa IMG_isICO
1075
+ * \sa IMG_isCUR
1076
+ * \sa IMG_isBMP
1077
+ * \sa IMG_isGIF
1078
+ * \sa IMG_isJPG
1079
+ * \sa IMG_isJXL
1080
+ * \sa IMG_isLBM
1081
+ * \sa IMG_isPCX
1082
+ * \sa IMG_isPNG
1083
+ * \sa IMG_isPNM
1084
+ * \sa IMG_isSVG
1085
+ * \sa IMG_isQOI
1086
+ * \sa IMG_isXCF
1087
+ * \sa IMG_isXPM
1088
+ * \sa IMG_isXV
1089
+ * \sa IMG_isWEBP
1090
+ */
119
1091
  extern DECLSPEC int SDLCALL IMG_isTIF(SDL_RWops *src);
1092
+
1093
+ /**
1094
+ * Detect XCF image data on a readable/seekable SDL_RWops.
1095
+ *
1096
+ * This function attempts to determine if a file is a given filetype, reading
1097
+ * the least amount possible from the SDL_RWops (usually a few bytes).
1098
+ *
1099
+ * There is no distinction made between "not the filetype in question" and
1100
+ * basic i/o errors.
1101
+ *
1102
+ * This function will always attempt to seek the RWops back to where it
1103
+ * started when this function was called, but it will not report any errors in
1104
+ * doing so, but assuming seeking works, this means you can immediately use
1105
+ * this with a different IMG_isTYPE function, or load the image without
1106
+ * further seeking.
1107
+ *
1108
+ * You do not need to call this function to load data; SDL_image can work to
1109
+ * determine file type in many cases in its standard load functions.
1110
+ *
1111
+ * \param src a seekable/readable SDL_RWops to provide image data.
1112
+ * \returns non-zero if this is XCF data, zero otherwise.
1113
+ *
1114
+ * \since This function is available since SDL_image 2.0.0.
1115
+ *
1116
+ * \sa IMG_isAVIF
1117
+ * \sa IMG_isICO
1118
+ * \sa IMG_isCUR
1119
+ * \sa IMG_isBMP
1120
+ * \sa IMG_isGIF
1121
+ * \sa IMG_isJPG
1122
+ * \sa IMG_isJXL
1123
+ * \sa IMG_isLBM
1124
+ * \sa IMG_isPCX
1125
+ * \sa IMG_isPNG
1126
+ * \sa IMG_isPNM
1127
+ * \sa IMG_isSVG
1128
+ * \sa IMG_isQOI
1129
+ * \sa IMG_isTIF
1130
+ * \sa IMG_isXPM
1131
+ * \sa IMG_isXV
1132
+ * \sa IMG_isWEBP
1133
+ */
120
1134
  extern DECLSPEC int SDLCALL IMG_isXCF(SDL_RWops *src);
1135
+
1136
+ /**
1137
+ * Detect XPM image data on a readable/seekable SDL_RWops.
1138
+ *
1139
+ * This function attempts to determine if a file is a given filetype, reading
1140
+ * the least amount possible from the SDL_RWops (usually a few bytes).
1141
+ *
1142
+ * There is no distinction made between "not the filetype in question" and
1143
+ * basic i/o errors.
1144
+ *
1145
+ * This function will always attempt to seek the RWops back to where it
1146
+ * started when this function was called, but it will not report any errors in
1147
+ * doing so, but assuming seeking works, this means you can immediately use
1148
+ * this with a different IMG_isTYPE function, or load the image without
1149
+ * further seeking.
1150
+ *
1151
+ * You do not need to call this function to load data; SDL_image can work to
1152
+ * determine file type in many cases in its standard load functions.
1153
+ *
1154
+ * \param src a seekable/readable SDL_RWops to provide image data.
1155
+ * \returns non-zero if this is XPM data, zero otherwise.
1156
+ *
1157
+ * \since This function is available since SDL_image 2.0.0.
1158
+ *
1159
+ * \sa IMG_isAVIF
1160
+ * \sa IMG_isICO
1161
+ * \sa IMG_isCUR
1162
+ * \sa IMG_isBMP
1163
+ * \sa IMG_isGIF
1164
+ * \sa IMG_isJPG
1165
+ * \sa IMG_isJXL
1166
+ * \sa IMG_isLBM
1167
+ * \sa IMG_isPCX
1168
+ * \sa IMG_isPNG
1169
+ * \sa IMG_isPNM
1170
+ * \sa IMG_isSVG
1171
+ * \sa IMG_isQOI
1172
+ * \sa IMG_isTIF
1173
+ * \sa IMG_isXCF
1174
+ * \sa IMG_isXV
1175
+ * \sa IMG_isWEBP
1176
+ */
121
1177
  extern DECLSPEC int SDLCALL IMG_isXPM(SDL_RWops *src);
1178
+
1179
+ /**
1180
+ * Detect XV image data on a readable/seekable SDL_RWops.
1181
+ *
1182
+ * This function attempts to determine if a file is a given filetype, reading
1183
+ * the least amount possible from the SDL_RWops (usually a few bytes).
1184
+ *
1185
+ * There is no distinction made between "not the filetype in question" and
1186
+ * basic i/o errors.
1187
+ *
1188
+ * This function will always attempt to seek the RWops back to where it
1189
+ * started when this function was called, but it will not report any errors in
1190
+ * doing so, but assuming seeking works, this means you can immediately use
1191
+ * this with a different IMG_isTYPE function, or load the image without
1192
+ * further seeking.
1193
+ *
1194
+ * You do not need to call this function to load data; SDL_image can work to
1195
+ * determine file type in many cases in its standard load functions.
1196
+ *
1197
+ * \param src a seekable/readable SDL_RWops to provide image data.
1198
+ * \returns non-zero if this is XV data, zero otherwise.
1199
+ *
1200
+ * \since This function is available since SDL_image 2.0.0.
1201
+ *
1202
+ * \sa IMG_isAVIF
1203
+ * \sa IMG_isICO
1204
+ * \sa IMG_isCUR
1205
+ * \sa IMG_isBMP
1206
+ * \sa IMG_isGIF
1207
+ * \sa IMG_isJPG
1208
+ * \sa IMG_isJXL
1209
+ * \sa IMG_isLBM
1210
+ * \sa IMG_isPCX
1211
+ * \sa IMG_isPNG
1212
+ * \sa IMG_isPNM
1213
+ * \sa IMG_isSVG
1214
+ * \sa IMG_isQOI
1215
+ * \sa IMG_isTIF
1216
+ * \sa IMG_isXCF
1217
+ * \sa IMG_isXPM
1218
+ * \sa IMG_isWEBP
1219
+ */
122
1220
  extern DECLSPEC int SDLCALL IMG_isXV(SDL_RWops *src);
1221
+
1222
+ /**
1223
+ * Detect WEBP image data on a readable/seekable SDL_RWops.
1224
+ *
1225
+ * This function attempts to determine if a file is a given filetype, reading
1226
+ * the least amount possible from the SDL_RWops (usually a few bytes).
1227
+ *
1228
+ * There is no distinction made between "not the filetype in question" and
1229
+ * basic i/o errors.
1230
+ *
1231
+ * This function will always attempt to seek the RWops back to where it
1232
+ * started when this function was called, but it will not report any errors in
1233
+ * doing so, but assuming seeking works, this means you can immediately use
1234
+ * this with a different IMG_isTYPE function, or load the image without
1235
+ * further seeking.
1236
+ *
1237
+ * You do not need to call this function to load data; SDL_image can work to
1238
+ * determine file type in many cases in its standard load functions.
1239
+ *
1240
+ * \param src a seekable/readable SDL_RWops to provide image data.
1241
+ * \returns non-zero if this is WEBP data, zero otherwise.
1242
+ *
1243
+ * \since This function is available since SDL_image 2.0.0.
1244
+ *
1245
+ * \sa IMG_isAVIF
1246
+ * \sa IMG_isICO
1247
+ * \sa IMG_isCUR
1248
+ * \sa IMG_isBMP
1249
+ * \sa IMG_isGIF
1250
+ * \sa IMG_isJPG
1251
+ * \sa IMG_isJXL
1252
+ * \sa IMG_isLBM
1253
+ * \sa IMG_isPCX
1254
+ * \sa IMG_isPNG
1255
+ * \sa IMG_isPNM
1256
+ * \sa IMG_isSVG
1257
+ * \sa IMG_isQOI
1258
+ * \sa IMG_isTIF
1259
+ * \sa IMG_isXCF
1260
+ * \sa IMG_isXPM
1261
+ * \sa IMG_isXV
1262
+ */
123
1263
  extern DECLSPEC int SDLCALL IMG_isWEBP(SDL_RWops *src);
124
1264
 
125
- /* Individual loading functions */
1265
+ /**
1266
+ * Load a AVIF image directly.
1267
+ *
1268
+ * If you know you definitely have a AVIF image, you can call this function,
1269
+ * which will skip SDL_image's file format detection routines. Generally it's
1270
+ * better to use the abstract interfaces; also, there is only an SDL_RWops
1271
+ * interface available here.
1272
+ *
1273
+ * \param src an SDL_RWops to load image data from.
1274
+ * \returns SDL surface, or NULL on error
1275
+ *
1276
+ * \since This function is available since SDL_image 2.6.0.
1277
+ *
1278
+ * \sa IMG_LoadICO_RW
1279
+ * \sa IMG_LoadCUR_RW
1280
+ * \sa IMG_LoadBMP_RW
1281
+ * \sa IMG_LoadGIF_RW
1282
+ * \sa IMG_LoadJPG_RW
1283
+ * \sa IMG_LoadJXL_RW
1284
+ * \sa IMG_LoadLBM_RW
1285
+ * \sa IMG_LoadPCX_RW
1286
+ * \sa IMG_LoadPNG_RW
1287
+ * \sa IMG_LoadPNM_RW
1288
+ * \sa IMG_LoadSVG_RW
1289
+ * \sa IMG_LoadQOI_RW
1290
+ * \sa IMG_LoadTGA_RW
1291
+ * \sa IMG_LoadTIF_RW
1292
+ * \sa IMG_LoadXCF_RW
1293
+ * \sa IMG_LoadXPM_RW
1294
+ * \sa IMG_LoadXV_RW
1295
+ * \sa IMG_LoadWEBP_RW
1296
+ */
1297
+ extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadAVIF_RW(SDL_RWops *src);
1298
+
1299
+ /**
1300
+ * Load a ICO image directly.
1301
+ *
1302
+ * If you know you definitely have a ICO image, you can call this function,
1303
+ * which will skip SDL_image's file format detection routines. Generally it's
1304
+ * better to use the abstract interfaces; also, there is only an SDL_RWops
1305
+ * interface available here.
1306
+ *
1307
+ * \param src an SDL_RWops to load image data from.
1308
+ * \returns SDL surface, or NULL on error
1309
+ *
1310
+ * \since This function is available since SDL_image 2.0.0.
1311
+ *
1312
+ * \sa IMG_LoadAVIF_RW
1313
+ * \sa IMG_LoadCUR_RW
1314
+ * \sa IMG_LoadBMP_RW
1315
+ * \sa IMG_LoadGIF_RW
1316
+ * \sa IMG_LoadJPG_RW
1317
+ * \sa IMG_LoadJXL_RW
1318
+ * \sa IMG_LoadLBM_RW
1319
+ * \sa IMG_LoadPCX_RW
1320
+ * \sa IMG_LoadPNG_RW
1321
+ * \sa IMG_LoadPNM_RW
1322
+ * \sa IMG_LoadSVG_RW
1323
+ * \sa IMG_LoadQOI_RW
1324
+ * \sa IMG_LoadTGA_RW
1325
+ * \sa IMG_LoadTIF_RW
1326
+ * \sa IMG_LoadXCF_RW
1327
+ * \sa IMG_LoadXPM_RW
1328
+ * \sa IMG_LoadXV_RW
1329
+ * \sa IMG_LoadWEBP_RW
1330
+ */
126
1331
  extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadICO_RW(SDL_RWops *src);
1332
+
1333
+ /**
1334
+ * Load a CUR image directly.
1335
+ *
1336
+ * If you know you definitely have a CUR image, you can call this function,
1337
+ * which will skip SDL_image's file format detection routines. Generally it's
1338
+ * better to use the abstract interfaces; also, there is only an SDL_RWops
1339
+ * interface available here.
1340
+ *
1341
+ * \param src an SDL_RWops to load image data from.
1342
+ * \returns SDL surface, or NULL on error
1343
+ *
1344
+ * \since This function is available since SDL_image 2.0.0.
1345
+ *
1346
+ * \sa IMG_LoadAVIF_RW
1347
+ * \sa IMG_LoadICO_RW
1348
+ * \sa IMG_LoadBMP_RW
1349
+ * \sa IMG_LoadGIF_RW
1350
+ * \sa IMG_LoadJPG_RW
1351
+ * \sa IMG_LoadJXL_RW
1352
+ * \sa IMG_LoadLBM_RW
1353
+ * \sa IMG_LoadPCX_RW
1354
+ * \sa IMG_LoadPNG_RW
1355
+ * \sa IMG_LoadPNM_RW
1356
+ * \sa IMG_LoadSVG_RW
1357
+ * \sa IMG_LoadQOI_RW
1358
+ * \sa IMG_LoadTGA_RW
1359
+ * \sa IMG_LoadTIF_RW
1360
+ * \sa IMG_LoadXCF_RW
1361
+ * \sa IMG_LoadXPM_RW
1362
+ * \sa IMG_LoadXV_RW
1363
+ * \sa IMG_LoadWEBP_RW
1364
+ */
127
1365
  extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadCUR_RW(SDL_RWops *src);
1366
+
1367
+ /**
1368
+ * Load a BMP image directly.
1369
+ *
1370
+ * If you know you definitely have a BMP image, you can call this function,
1371
+ * which will skip SDL_image's file format detection routines. Generally it's
1372
+ * better to use the abstract interfaces; also, there is only an SDL_RWops
1373
+ * interface available here.
1374
+ *
1375
+ * \param src an SDL_RWops to load image data from.
1376
+ * \returns SDL surface, or NULL on error
1377
+ *
1378
+ * \since This function is available since SDL_image 2.0.0.
1379
+ *
1380
+ * \sa IMG_LoadAVIF_RW
1381
+ * \sa IMG_LoadICO_RW
1382
+ * \sa IMG_LoadCUR_RW
1383
+ * \sa IMG_LoadGIF_RW
1384
+ * \sa IMG_LoadJPG_RW
1385
+ * \sa IMG_LoadJXL_RW
1386
+ * \sa IMG_LoadLBM_RW
1387
+ * \sa IMG_LoadPCX_RW
1388
+ * \sa IMG_LoadPNG_RW
1389
+ * \sa IMG_LoadPNM_RW
1390
+ * \sa IMG_LoadSVG_RW
1391
+ * \sa IMG_LoadQOI_RW
1392
+ * \sa IMG_LoadTGA_RW
1393
+ * \sa IMG_LoadTIF_RW
1394
+ * \sa IMG_LoadXCF_RW
1395
+ * \sa IMG_LoadXPM_RW
1396
+ * \sa IMG_LoadXV_RW
1397
+ * \sa IMG_LoadWEBP_RW
1398
+ */
128
1399
  extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadBMP_RW(SDL_RWops *src);
1400
+
1401
+ /**
1402
+ * Load a GIF image directly.
1403
+ *
1404
+ * If you know you definitely have a GIF image, you can call this function,
1405
+ * which will skip SDL_image's file format detection routines. Generally it's
1406
+ * better to use the abstract interfaces; also, there is only an SDL_RWops
1407
+ * interface available here.
1408
+ *
1409
+ * \param src an SDL_RWops to load image data from.
1410
+ * \returns SDL surface, or NULL on error
1411
+ *
1412
+ * \since This function is available since SDL_image 2.0.0.
1413
+ *
1414
+ * \sa IMG_LoadAVIF_RW
1415
+ * \sa IMG_LoadICO_RW
1416
+ * \sa IMG_LoadCUR_RW
1417
+ * \sa IMG_LoadBMP_RW
1418
+ * \sa IMG_LoadJPG_RW
1419
+ * \sa IMG_LoadJXL_RW
1420
+ * \sa IMG_LoadLBM_RW
1421
+ * \sa IMG_LoadPCX_RW
1422
+ * \sa IMG_LoadPNG_RW
1423
+ * \sa IMG_LoadPNM_RW
1424
+ * \sa IMG_LoadSVG_RW
1425
+ * \sa IMG_LoadQOI_RW
1426
+ * \sa IMG_LoadTGA_RW
1427
+ * \sa IMG_LoadTIF_RW
1428
+ * \sa IMG_LoadXCF_RW
1429
+ * \sa IMG_LoadXPM_RW
1430
+ * \sa IMG_LoadXV_RW
1431
+ * \sa IMG_LoadWEBP_RW
1432
+ */
129
1433
  extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadGIF_RW(SDL_RWops *src);
1434
+
1435
+ /**
1436
+ * Load a JPG image directly.
1437
+ *
1438
+ * If you know you definitely have a JPG image, you can call this function,
1439
+ * which will skip SDL_image's file format detection routines. Generally it's
1440
+ * better to use the abstract interfaces; also, there is only an SDL_RWops
1441
+ * interface available here.
1442
+ *
1443
+ * \param src an SDL_RWops to load image data from.
1444
+ * \returns SDL surface, or NULL on error
1445
+ *
1446
+ * \since This function is available since SDL_image 2.0.0.
1447
+ *
1448
+ * \sa IMG_LoadAVIF_RW
1449
+ * \sa IMG_LoadICO_RW
1450
+ * \sa IMG_LoadCUR_RW
1451
+ * \sa IMG_LoadBMP_RW
1452
+ * \sa IMG_LoadGIF_RW
1453
+ * \sa IMG_LoadJXL_RW
1454
+ * \sa IMG_LoadLBM_RW
1455
+ * \sa IMG_LoadPCX_RW
1456
+ * \sa IMG_LoadPNG_RW
1457
+ * \sa IMG_LoadPNM_RW
1458
+ * \sa IMG_LoadSVG_RW
1459
+ * \sa IMG_LoadQOI_RW
1460
+ * \sa IMG_LoadTGA_RW
1461
+ * \sa IMG_LoadTIF_RW
1462
+ * \sa IMG_LoadXCF_RW
1463
+ * \sa IMG_LoadXPM_RW
1464
+ * \sa IMG_LoadXV_RW
1465
+ * \sa IMG_LoadWEBP_RW
1466
+ */
130
1467
  extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadJPG_RW(SDL_RWops *src);
1468
+
1469
+ /**
1470
+ * Load a JXL image directly.
1471
+ *
1472
+ * If you know you definitely have a JXL image, you can call this function,
1473
+ * which will skip SDL_image's file format detection routines. Generally it's
1474
+ * better to use the abstract interfaces; also, there is only an SDL_RWops
1475
+ * interface available here.
1476
+ *
1477
+ * \param src an SDL_RWops to load image data from.
1478
+ * \returns SDL surface, or NULL on error
1479
+ *
1480
+ * \since This function is available since SDL_image 2.6.0.
1481
+ *
1482
+ * \sa IMG_LoadAVIF_RW
1483
+ * \sa IMG_LoadICO_RW
1484
+ * \sa IMG_LoadCUR_RW
1485
+ * \sa IMG_LoadBMP_RW
1486
+ * \sa IMG_LoadGIF_RW
1487
+ * \sa IMG_LoadJPG_RW
1488
+ * \sa IMG_LoadLBM_RW
1489
+ * \sa IMG_LoadPCX_RW
1490
+ * \sa IMG_LoadPNG_RW
1491
+ * \sa IMG_LoadPNM_RW
1492
+ * \sa IMG_LoadSVG_RW
1493
+ * \sa IMG_LoadQOI_RW
1494
+ * \sa IMG_LoadTGA_RW
1495
+ * \sa IMG_LoadTIF_RW
1496
+ * \sa IMG_LoadXCF_RW
1497
+ * \sa IMG_LoadXPM_RW
1498
+ * \sa IMG_LoadXV_RW
1499
+ * \sa IMG_LoadWEBP_RW
1500
+ */
1501
+ extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadJXL_RW(SDL_RWops *src);
1502
+
1503
+ /**
1504
+ * Load a LBM image directly.
1505
+ *
1506
+ * If you know you definitely have a LBM image, you can call this function,
1507
+ * which will skip SDL_image's file format detection routines. Generally it's
1508
+ * better to use the abstract interfaces; also, there is only an SDL_RWops
1509
+ * interface available here.
1510
+ *
1511
+ * \param src an SDL_RWops to load image data from.
1512
+ * \returns SDL surface, or NULL on error
1513
+ *
1514
+ * \since This function is available since SDL_image 2.0.0.
1515
+ *
1516
+ * \sa IMG_LoadAVIF_RW
1517
+ * \sa IMG_LoadICO_RW
1518
+ * \sa IMG_LoadCUR_RW
1519
+ * \sa IMG_LoadBMP_RW
1520
+ * \sa IMG_LoadGIF_RW
1521
+ * \sa IMG_LoadJPG_RW
1522
+ * \sa IMG_LoadJXL_RW
1523
+ * \sa IMG_LoadPCX_RW
1524
+ * \sa IMG_LoadPNG_RW
1525
+ * \sa IMG_LoadPNM_RW
1526
+ * \sa IMG_LoadSVG_RW
1527
+ * \sa IMG_LoadQOI_RW
1528
+ * \sa IMG_LoadTGA_RW
1529
+ * \sa IMG_LoadTIF_RW
1530
+ * \sa IMG_LoadXCF_RW
1531
+ * \sa IMG_LoadXPM_RW
1532
+ * \sa IMG_LoadXV_RW
1533
+ * \sa IMG_LoadWEBP_RW
1534
+ */
131
1535
  extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadLBM_RW(SDL_RWops *src);
1536
+
1537
+ /**
1538
+ * Load a PCX image directly.
1539
+ *
1540
+ * If you know you definitely have a PCX image, you can call this function,
1541
+ * which will skip SDL_image's file format detection routines. Generally it's
1542
+ * better to use the abstract interfaces; also, there is only an SDL_RWops
1543
+ * interface available here.
1544
+ *
1545
+ * \param src an SDL_RWops to load image data from.
1546
+ * \returns SDL surface, or NULL on error
1547
+ *
1548
+ * \since This function is available since SDL_image 2.0.0.
1549
+ *
1550
+ * \sa IMG_LoadAVIF_RW
1551
+ * \sa IMG_LoadICO_RW
1552
+ * \sa IMG_LoadCUR_RW
1553
+ * \sa IMG_LoadBMP_RW
1554
+ * \sa IMG_LoadGIF_RW
1555
+ * \sa IMG_LoadJPG_RW
1556
+ * \sa IMG_LoadJXL_RW
1557
+ * \sa IMG_LoadLBM_RW
1558
+ * \sa IMG_LoadPNG_RW
1559
+ * \sa IMG_LoadPNM_RW
1560
+ * \sa IMG_LoadSVG_RW
1561
+ * \sa IMG_LoadQOI_RW
1562
+ * \sa IMG_LoadTGA_RW
1563
+ * \sa IMG_LoadTIF_RW
1564
+ * \sa IMG_LoadXCF_RW
1565
+ * \sa IMG_LoadXPM_RW
1566
+ * \sa IMG_LoadXV_RW
1567
+ * \sa IMG_LoadWEBP_RW
1568
+ */
132
1569
  extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadPCX_RW(SDL_RWops *src);
1570
+
1571
+ /**
1572
+ * Load a PNG image directly.
1573
+ *
1574
+ * If you know you definitely have a PNG image, you can call this function,
1575
+ * which will skip SDL_image's file format detection routines. Generally it's
1576
+ * better to use the abstract interfaces; also, there is only an SDL_RWops
1577
+ * interface available here.
1578
+ *
1579
+ * \param src an SDL_RWops to load image data from.
1580
+ * \returns SDL surface, or NULL on error
1581
+ *
1582
+ * \since This function is available since SDL_image 2.0.0.
1583
+ *
1584
+ * \sa IMG_LoadAVIF_RW
1585
+ * \sa IMG_LoadICO_RW
1586
+ * \sa IMG_LoadCUR_RW
1587
+ * \sa IMG_LoadBMP_RW
1588
+ * \sa IMG_LoadGIF_RW
1589
+ * \sa IMG_LoadJPG_RW
1590
+ * \sa IMG_LoadJXL_RW
1591
+ * \sa IMG_LoadLBM_RW
1592
+ * \sa IMG_LoadPCX_RW
1593
+ * \sa IMG_LoadPNM_RW
1594
+ * \sa IMG_LoadSVG_RW
1595
+ * \sa IMG_LoadQOI_RW
1596
+ * \sa IMG_LoadTGA_RW
1597
+ * \sa IMG_LoadTIF_RW
1598
+ * \sa IMG_LoadXCF_RW
1599
+ * \sa IMG_LoadXPM_RW
1600
+ * \sa IMG_LoadXV_RW
1601
+ * \sa IMG_LoadWEBP_RW
1602
+ */
133
1603
  extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadPNG_RW(SDL_RWops *src);
1604
+
1605
+ /**
1606
+ * Load a PNM image directly.
1607
+ *
1608
+ * If you know you definitely have a PNM image, you can call this function,
1609
+ * which will skip SDL_image's file format detection routines. Generally it's
1610
+ * better to use the abstract interfaces; also, there is only an SDL_RWops
1611
+ * interface available here.
1612
+ *
1613
+ * \param src an SDL_RWops to load image data from.
1614
+ * \returns SDL surface, or NULL on error
1615
+ *
1616
+ * \since This function is available since SDL_image 2.0.0.
1617
+ *
1618
+ * \sa IMG_LoadAVIF_RW
1619
+ * \sa IMG_LoadICO_RW
1620
+ * \sa IMG_LoadCUR_RW
1621
+ * \sa IMG_LoadBMP_RW
1622
+ * \sa IMG_LoadGIF_RW
1623
+ * \sa IMG_LoadJPG_RW
1624
+ * \sa IMG_LoadJXL_RW
1625
+ * \sa IMG_LoadLBM_RW
1626
+ * \sa IMG_LoadPCX_RW
1627
+ * \sa IMG_LoadPNG_RW
1628
+ * \sa IMG_LoadSVG_RW
1629
+ * \sa IMG_LoadQOI_RW
1630
+ * \sa IMG_LoadTGA_RW
1631
+ * \sa IMG_LoadTIF_RW
1632
+ * \sa IMG_LoadXCF_RW
1633
+ * \sa IMG_LoadXPM_RW
1634
+ * \sa IMG_LoadXV_RW
1635
+ * \sa IMG_LoadWEBP_RW
1636
+ */
134
1637
  extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadPNM_RW(SDL_RWops *src);
1638
+
1639
+ /**
1640
+ * Load a SVG image directly.
1641
+ *
1642
+ * If you know you definitely have a SVG image, you can call this function,
1643
+ * which will skip SDL_image's file format detection routines. Generally it's
1644
+ * better to use the abstract interfaces; also, there is only an SDL_RWops
1645
+ * interface available here.
1646
+ *
1647
+ * \param src an SDL_RWops to load image data from.
1648
+ * \returns SDL surface, or NULL on error
1649
+ *
1650
+ * \since This function is available since SDL_image 2.0.2.
1651
+ *
1652
+ * \sa IMG_LoadAVIF_RW
1653
+ * \sa IMG_LoadICO_RW
1654
+ * \sa IMG_LoadCUR_RW
1655
+ * \sa IMG_LoadBMP_RW
1656
+ * \sa IMG_LoadGIF_RW
1657
+ * \sa IMG_LoadJPG_RW
1658
+ * \sa IMG_LoadJXL_RW
1659
+ * \sa IMG_LoadLBM_RW
1660
+ * \sa IMG_LoadPCX_RW
1661
+ * \sa IMG_LoadPNG_RW
1662
+ * \sa IMG_LoadPNM_RW
1663
+ * \sa IMG_LoadQOI_RW
1664
+ * \sa IMG_LoadTGA_RW
1665
+ * \sa IMG_LoadTIF_RW
1666
+ * \sa IMG_LoadXCF_RW
1667
+ * \sa IMG_LoadXPM_RW
1668
+ * \sa IMG_LoadXV_RW
1669
+ * \sa IMG_LoadWEBP_RW
1670
+ */
135
1671
  extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadSVG_RW(SDL_RWops *src);
1672
+
1673
+ /**
1674
+ * Load a QOI image directly.
1675
+ *
1676
+ * If you know you definitely have a QOI image, you can call this function,
1677
+ * which will skip SDL_image's file format detection routines. Generally it's
1678
+ * better to use the abstract interfaces; also, there is only an SDL_RWops
1679
+ * interface available here.
1680
+ *
1681
+ * \param src an SDL_RWops to load image data from.
1682
+ * \returns SDL surface, or NULL on error
1683
+ *
1684
+ * \since This function is available since SDL_image 2.6.0.
1685
+ *
1686
+ * \sa IMG_LoadAVIF_RW
1687
+ * \sa IMG_LoadICO_RW
1688
+ * \sa IMG_LoadCUR_RW
1689
+ * \sa IMG_LoadBMP_RW
1690
+ * \sa IMG_LoadGIF_RW
1691
+ * \sa IMG_LoadJPG_RW
1692
+ * \sa IMG_LoadJXL_RW
1693
+ * \sa IMG_LoadLBM_RW
1694
+ * \sa IMG_LoadPCX_RW
1695
+ * \sa IMG_LoadPNG_RW
1696
+ * \sa IMG_LoadPNM_RW
1697
+ * \sa IMG_LoadSVG_RW
1698
+ * \sa IMG_LoadTGA_RW
1699
+ * \sa IMG_LoadTIF_RW
1700
+ * \sa IMG_LoadXCF_RW
1701
+ * \sa IMG_LoadXPM_RW
1702
+ * \sa IMG_LoadXV_RW
1703
+ * \sa IMG_LoadWEBP_RW
1704
+ */
1705
+ extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadQOI_RW(SDL_RWops *src);
1706
+
1707
+ /**
1708
+ * Load a TGA image directly.
1709
+ *
1710
+ * If you know you definitely have a TGA image, you can call this function,
1711
+ * which will skip SDL_image's file format detection routines. Generally it's
1712
+ * better to use the abstract interfaces; also, there is only an SDL_RWops
1713
+ * interface available here.
1714
+ *
1715
+ * \param src an SDL_RWops to load image data from.
1716
+ * \returns SDL surface, or NULL on error
1717
+ *
1718
+ * \since This function is available since SDL_image 2.0.0.
1719
+ *
1720
+ * \sa IMG_LoadAVIF_RW
1721
+ * \sa IMG_LoadICO_RW
1722
+ * \sa IMG_LoadCUR_RW
1723
+ * \sa IMG_LoadBMP_RW
1724
+ * \sa IMG_LoadGIF_RW
1725
+ * \sa IMG_LoadJPG_RW
1726
+ * \sa IMG_LoadJXL_RW
1727
+ * \sa IMG_LoadLBM_RW
1728
+ * \sa IMG_LoadPCX_RW
1729
+ * \sa IMG_LoadPNG_RW
1730
+ * \sa IMG_LoadPNM_RW
1731
+ * \sa IMG_LoadSVG_RW
1732
+ * \sa IMG_LoadQOI_RW
1733
+ * \sa IMG_LoadTIF_RW
1734
+ * \sa IMG_LoadXCF_RW
1735
+ * \sa IMG_LoadXPM_RW
1736
+ * \sa IMG_LoadXV_RW
1737
+ * \sa IMG_LoadWEBP_RW
1738
+ */
136
1739
  extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadTGA_RW(SDL_RWops *src);
1740
+
1741
+ /**
1742
+ * Load a TIFF image directly.
1743
+ *
1744
+ * If you know you definitely have a TIFF image, you can call this function,
1745
+ * which will skip SDL_image's file format detection routines. Generally it's
1746
+ * better to use the abstract interfaces; also, there is only an SDL_RWops
1747
+ * interface available here.
1748
+ *
1749
+ * \param src an SDL_RWops to load image data from.
1750
+ * \returns SDL surface, or NULL on error
1751
+ *
1752
+ * \since This function is available since SDL_image 2.0.0.
1753
+ *
1754
+ * \sa IMG_LoadAVIF_RW
1755
+ * \sa IMG_LoadICO_RW
1756
+ * \sa IMG_LoadCUR_RW
1757
+ * \sa IMG_LoadBMP_RW
1758
+ * \sa IMG_LoadGIF_RW
1759
+ * \sa IMG_LoadJPG_RW
1760
+ * \sa IMG_LoadJXL_RW
1761
+ * \sa IMG_LoadLBM_RW
1762
+ * \sa IMG_LoadPCX_RW
1763
+ * \sa IMG_LoadPNG_RW
1764
+ * \sa IMG_LoadPNM_RW
1765
+ * \sa IMG_LoadSVG_RW
1766
+ * \sa IMG_LoadQOI_RW
1767
+ * \sa IMG_LoadTGA_RW
1768
+ * \sa IMG_LoadXCF_RW
1769
+ * \sa IMG_LoadXPM_RW
1770
+ * \sa IMG_LoadXV_RW
1771
+ * \sa IMG_LoadWEBP_RW
1772
+ */
137
1773
  extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadTIF_RW(SDL_RWops *src);
1774
+
1775
+ /**
1776
+ * Load a XCF image directly.
1777
+ *
1778
+ * If you know you definitely have a XCF image, you can call this function,
1779
+ * which will skip SDL_image's file format detection routines. Generally it's
1780
+ * better to use the abstract interfaces; also, there is only an SDL_RWops
1781
+ * interface available here.
1782
+ *
1783
+ * \param src an SDL_RWops to load image data from.
1784
+ * \returns SDL surface, or NULL on error
1785
+ *
1786
+ * \since This function is available since SDL_image 2.0.0.
1787
+ *
1788
+ * \sa IMG_LoadAVIF_RW
1789
+ * \sa IMG_LoadICO_RW
1790
+ * \sa IMG_LoadCUR_RW
1791
+ * \sa IMG_LoadBMP_RW
1792
+ * \sa IMG_LoadGIF_RW
1793
+ * \sa IMG_LoadJPG_RW
1794
+ * \sa IMG_LoadJXL_RW
1795
+ * \sa IMG_LoadLBM_RW
1796
+ * \sa IMG_LoadPCX_RW
1797
+ * \sa IMG_LoadPNG_RW
1798
+ * \sa IMG_LoadPNM_RW
1799
+ * \sa IMG_LoadSVG_RW
1800
+ * \sa IMG_LoadQOI_RW
1801
+ * \sa IMG_LoadTGA_RW
1802
+ * \sa IMG_LoadTIF_RW
1803
+ * \sa IMG_LoadXPM_RW
1804
+ * \sa IMG_LoadXV_RW
1805
+ * \sa IMG_LoadWEBP_RW
1806
+ */
138
1807
  extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadXCF_RW(SDL_RWops *src);
1808
+
1809
+ /**
1810
+ * Load a XPM image directly.
1811
+ *
1812
+ * If you know you definitely have a XPM image, you can call this function,
1813
+ * which will skip SDL_image's file format detection routines. Generally it's
1814
+ * better to use the abstract interfaces; also, there is only an SDL_RWops
1815
+ * interface available here.
1816
+ *
1817
+ * \param src an SDL_RWops to load image data from.
1818
+ * \returns SDL surface, or NULL on error
1819
+ *
1820
+ * \since This function is available since SDL_image 2.0.0.
1821
+ *
1822
+ * \sa IMG_LoadAVIF_RW
1823
+ * \sa IMG_LoadICO_RW
1824
+ * \sa IMG_LoadCUR_RW
1825
+ * \sa IMG_LoadBMP_RW
1826
+ * \sa IMG_LoadGIF_RW
1827
+ * \sa IMG_LoadJPG_RW
1828
+ * \sa IMG_LoadJXL_RW
1829
+ * \sa IMG_LoadLBM_RW
1830
+ * \sa IMG_LoadPCX_RW
1831
+ * \sa IMG_LoadPNG_RW
1832
+ * \sa IMG_LoadPNM_RW
1833
+ * \sa IMG_LoadSVG_RW
1834
+ * \sa IMG_LoadQOI_RW
1835
+ * \sa IMG_LoadTGA_RW
1836
+ * \sa IMG_LoadTIF_RW
1837
+ * \sa IMG_LoadXCF_RW
1838
+ * \sa IMG_LoadXV_RW
1839
+ * \sa IMG_LoadWEBP_RW
1840
+ */
139
1841
  extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadXPM_RW(SDL_RWops *src);
1842
+
1843
+ /**
1844
+ * Load a XV image directly.
1845
+ *
1846
+ * If you know you definitely have a XV image, you can call this function,
1847
+ * which will skip SDL_image's file format detection routines. Generally it's
1848
+ * better to use the abstract interfaces; also, there is only an SDL_RWops
1849
+ * interface available here.
1850
+ *
1851
+ * \param src an SDL_RWops to load image data from.
1852
+ * \returns SDL surface, or NULL on error
1853
+ *
1854
+ * \since This function is available since SDL_image 2.0.0.
1855
+ *
1856
+ * \sa IMG_LoadAVIF_RW
1857
+ * \sa IMG_LoadICO_RW
1858
+ * \sa IMG_LoadCUR_RW
1859
+ * \sa IMG_LoadBMP_RW
1860
+ * \sa IMG_LoadGIF_RW
1861
+ * \sa IMG_LoadJPG_RW
1862
+ * \sa IMG_LoadJXL_RW
1863
+ * \sa IMG_LoadLBM_RW
1864
+ * \sa IMG_LoadPCX_RW
1865
+ * \sa IMG_LoadPNG_RW
1866
+ * \sa IMG_LoadPNM_RW
1867
+ * \sa IMG_LoadSVG_RW
1868
+ * \sa IMG_LoadQOI_RW
1869
+ * \sa IMG_LoadTGA_RW
1870
+ * \sa IMG_LoadTIF_RW
1871
+ * \sa IMG_LoadXCF_RW
1872
+ * \sa IMG_LoadXPM_RW
1873
+ * \sa IMG_LoadWEBP_RW
1874
+ */
140
1875
  extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadXV_RW(SDL_RWops *src);
1876
+
1877
+ /**
1878
+ * Load a WEBP image directly.
1879
+ *
1880
+ * If you know you definitely have a WEBP image, you can call this function,
1881
+ * which will skip SDL_image's file format detection routines. Generally it's
1882
+ * better to use the abstract interfaces; also, there is only an SDL_RWops
1883
+ * interface available here.
1884
+ *
1885
+ * \param src an SDL_RWops to load image data from.
1886
+ * \returns SDL surface, or NULL on error
1887
+ *
1888
+ * \since This function is available since SDL_image 2.0.0.
1889
+ *
1890
+ * \sa IMG_LoadAVIF_RW
1891
+ * \sa IMG_LoadICO_RW
1892
+ * \sa IMG_LoadCUR_RW
1893
+ * \sa IMG_LoadBMP_RW
1894
+ * \sa IMG_LoadGIF_RW
1895
+ * \sa IMG_LoadJPG_RW
1896
+ * \sa IMG_LoadJXL_RW
1897
+ * \sa IMG_LoadLBM_RW
1898
+ * \sa IMG_LoadPCX_RW
1899
+ * \sa IMG_LoadPNG_RW
1900
+ * \sa IMG_LoadPNM_RW
1901
+ * \sa IMG_LoadSVG_RW
1902
+ * \sa IMG_LoadQOI_RW
1903
+ * \sa IMG_LoadTGA_RW
1904
+ * \sa IMG_LoadTIF_RW
1905
+ * \sa IMG_LoadXCF_RW
1906
+ * \sa IMG_LoadXPM_RW
1907
+ * \sa IMG_LoadXV_RW
1908
+ */
141
1909
  extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadWEBP_RW(SDL_RWops *src);
142
1910
 
1911
+ /**
1912
+ * Load an SVG image, scaled to a specific size.
1913
+ *
1914
+ * Since SVG files are resolution-independent, you specify the size you would
1915
+ * like the output image to be and it will be generated at those dimensions.
1916
+ *
1917
+ * Either width or height may be 0 and the image will be auto-sized to
1918
+ * preserve aspect ratio.
1919
+ *
1920
+ * When done with the returned surface, the app should dispose of it with a
1921
+ * call to SDL_FreeSurface().
1922
+ *
1923
+ * \param src an SDL_RWops to load SVG data from.
1924
+ * \param width desired width of the generated surface, in pixels.
1925
+ * \param height desired height of the generated surface, in pixels.
1926
+ * \returns a new SDL surface, or NULL on error.
1927
+ *
1928
+ * \since This function is available since SDL_image 2.6.0.
1929
+ */
1930
+ extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadSizedSVG_RW(SDL_RWops *src, int width, int height);
1931
+
1932
+ /**
1933
+ * Load an XPM image from a memory array.
1934
+ *
1935
+ * The returned surface will be an 8bpp indexed surface, if possible,
1936
+ * otherwise it will be 32bpp. If you always want 32-bit data, use
1937
+ * IMG_ReadXPMFromArrayToRGB888() instead.
1938
+ *
1939
+ * When done with the returned surface, the app should dispose of it with a
1940
+ * call to SDL_FreeSurface().
1941
+ *
1942
+ * \param xpm a null-terminated array of strings that comprise XPM data.
1943
+ * \returns a new SDL surface, or NULL on error.
1944
+ *
1945
+ * \since This function is available since SDL_image 2.0.0.
1946
+ *
1947
+ * \sa IMG_ReadXPMFromArrayToRGB888
1948
+ */
143
1949
  extern DECLSPEC SDL_Surface * SDLCALL IMG_ReadXPMFromArray(char **xpm);
144
1950
 
145
- /* Individual saving functions */
1951
+ /**
1952
+ * Load an XPM image from a memory array.
1953
+ *
1954
+ * The returned surface will always be a 32-bit RGB surface. If you want 8-bit
1955
+ * indexed colors (and the XPM data allows it), use IMG_ReadXPMFromArray()
1956
+ * instead.
1957
+ *
1958
+ * When done with the returned surface, the app should dispose of it with a
1959
+ * call to SDL_FreeSurface().
1960
+ *
1961
+ * \param xpm a null-terminated array of strings that comprise XPM data.
1962
+ * \returns a new SDL surface, or NULL on error.
1963
+ *
1964
+ * \since This function is available since SDL_image 2.6.0.
1965
+ *
1966
+ * \sa IMG_ReadXPMFromArray
1967
+ */
1968
+ extern DECLSPEC SDL_Surface * SDLCALL IMG_ReadXPMFromArrayToRGB888(char **xpm);
1969
+
1970
+ /**
1971
+ * Save an SDL_Surface into a PNG image file.
1972
+ *
1973
+ * If the file already exists, it will be overwritten.
1974
+ *
1975
+ * \param surface the SDL surface to save
1976
+ * \param file path on the filesystem to write new file to.
1977
+ * \returns 0 if successful, -1 on error
1978
+ *
1979
+ * \since This function is available since SDL_image 2.0.0.
1980
+ *
1981
+ * \sa IMG_SavePNG_RW
1982
+ * \sa IMG_SaveJPG
1983
+ * \sa IMG_SaveJPG_RW
1984
+ */
146
1985
  extern DECLSPEC int SDLCALL IMG_SavePNG(SDL_Surface *surface, const char *file);
1986
+
1987
+ /**
1988
+ * Save an SDL_Surface into PNG image data, via an SDL_RWops.
1989
+ *
1990
+ * If you just want to save to a filename, you can use IMG_SavePNG() instead.
1991
+ *
1992
+ * \param surface the SDL surface to save
1993
+ * \param dst the SDL_RWops to save the image data to.
1994
+ * \returns 0 if successful, -1 on error.
1995
+ *
1996
+ * \since This function is available since SDL_image 2.0.0.
1997
+ *
1998
+ * \sa IMG_SavePNG
1999
+ * \sa IMG_SaveJPG
2000
+ * \sa IMG_SaveJPG_RW
2001
+ */
147
2002
  extern DECLSPEC int SDLCALL IMG_SavePNG_RW(SDL_Surface *surface, SDL_RWops *dst, int freedst);
2003
+
2004
+ /**
2005
+ * Save an SDL_Surface into a JPEG image file.
2006
+ *
2007
+ * If the file already exists, it will be overwritten.
2008
+ *
2009
+ * \param surface the SDL surface to save
2010
+ * \param file path on the filesystem to write new file to.
2011
+ * \param quality [0; 33] is Lowest quality, [34; 66] is Middle quality, [67;
2012
+ * 100] is Highest quality
2013
+ * \returns 0 if successful, -1 on error
2014
+ *
2015
+ * \since This function is available since SDL_image 2.0.2.
2016
+ *
2017
+ * \sa IMG_SaveJPG_RW
2018
+ * \sa IMG_SavePNG
2019
+ * \sa IMG_SavePNG_RW
2020
+ */
148
2021
  extern DECLSPEC int SDLCALL IMG_SaveJPG(SDL_Surface *surface, const char *file, int quality);
2022
+
2023
+ /**
2024
+ * Save an SDL_Surface into JPEG image data, via an SDL_RWops.
2025
+ *
2026
+ * If you just want to save to a filename, you can use IMG_SaveJPG() instead.
2027
+ *
2028
+ * \param surface the SDL surface to save
2029
+ * \param dst the SDL_RWops to save the image data to.
2030
+ * \returns 0 if successful, -1 on error.
2031
+ *
2032
+ * \since This function is available since SDL_image 2.0.2.
2033
+ *
2034
+ * \sa IMG_SaveJPG
2035
+ * \sa IMG_SavePNG
2036
+ * \sa IMG_SavePNG_RW
2037
+ */
149
2038
  extern DECLSPEC int SDLCALL IMG_SaveJPG_RW(SDL_Surface *surface, SDL_RWops *dst, int freedst, int quality);
150
2039
 
151
- /* We'll use SDL for reporting errors */
2040
+ /**
2041
+ * Animated image support
2042
+ * Currently only animated GIFs are supported.
2043
+ */
2044
+ typedef struct
2045
+ {
2046
+ int w, h;
2047
+ int count;
2048
+ SDL_Surface **frames;
2049
+ int *delays;
2050
+ } IMG_Animation;
2051
+
2052
+ /**
2053
+ * Load an animation from a file.
2054
+ *
2055
+ * When done with the returned animation, the app should dispose of it with a
2056
+ * call to IMG_FreeAnimation().
2057
+ *
2058
+ * \param file path on the filesystem containing an animated image.
2059
+ * \returns a new IMG_Animation, or NULL on error.
2060
+ *
2061
+ * \since This function is available since SDL_image 2.6.0.
2062
+ *
2063
+ * \sa IMG_FreeAnimation
2064
+ */
2065
+ extern DECLSPEC IMG_Animation * SDLCALL IMG_LoadAnimation(const char *file);
2066
+
2067
+ /**
2068
+ * Load an animation from an SDL_RWops.
2069
+ *
2070
+ * If `freesrc` is non-zero, the RWops will be closed before returning,
2071
+ * whether this function succeeds or not. SDL_image reads everything it needs
2072
+ * from the RWops during this call in any case.
2073
+ *
2074
+ * When done with the returned animation, the app should dispose of it with a
2075
+ * call to IMG_FreeAnimation().
2076
+ *
2077
+ * \param src an SDL_RWops that data will be read from.
2078
+ * \param freesrc non-zero to close/free the SDL_RWops before returning, zero
2079
+ * to leave it open.
2080
+ * \returns a new IMG_Animation, or NULL on error.
2081
+ *
2082
+ * \since This function is available since SDL_image 2.6.0.
2083
+ *
2084
+ * \sa IMG_FreeAnimation
2085
+ */
2086
+ extern DECLSPEC IMG_Animation * SDLCALL IMG_LoadAnimation_RW(SDL_RWops *src, int freesrc);
2087
+
2088
+ /**
2089
+ * Load an animation from an SDL datasource
2090
+ *
2091
+ * Even though this function accepts a file type, SDL_image may still try
2092
+ * other decoders that are capable of detecting file type from the contents of
2093
+ * the image data, but may rely on the caller-provided type string for formats
2094
+ * that it cannot autodetect. If `type` is NULL, SDL_image will rely solely on
2095
+ * its ability to guess the format.
2096
+ *
2097
+ * If `freesrc` is non-zero, the RWops will be closed before returning,
2098
+ * whether this function succeeds or not. SDL_image reads everything it needs
2099
+ * from the RWops during this call in any case.
2100
+ *
2101
+ * When done with the returned animation, the app should dispose of it with a
2102
+ * call to IMG_FreeAnimation().
2103
+ *
2104
+ * \param src an SDL_RWops that data will be read from.
2105
+ * \param freesrc non-zero to close/free the SDL_RWops before returning, zero
2106
+ * to leave it open.
2107
+ * \param type a filename extension that represent this data ("GIF", etc).
2108
+ * \returns a new IMG_Animation, or NULL on error.
2109
+ *
2110
+ * \since This function is available since SDL_image 2.6.0.
2111
+ *
2112
+ * \sa IMG_LoadAnimation
2113
+ * \sa IMG_LoadAnimation_RW
2114
+ * \sa IMG_FreeAnimation
2115
+ */
2116
+ extern DECLSPEC IMG_Animation * SDLCALL IMG_LoadAnimationTyped_RW(SDL_RWops *src, int freesrc, const char *type);
2117
+
2118
+ /**
2119
+ * Dispose of an IMG_Animation and free its resources.
2120
+ *
2121
+ * The provided `anim` pointer is not valid once this call returns.
2122
+ *
2123
+ * \param anim IMG_Animation to dispose of.
2124
+ *
2125
+ * \since This function is available since SDL_image 2.6.0.
2126
+ *
2127
+ * \sa IMG_LoadAnimation
2128
+ * \sa IMG_LoadAnimation_RW
2129
+ * \sa IMG_LoadAnimationTyped_RW
2130
+ */
2131
+ extern DECLSPEC void SDLCALL IMG_FreeAnimation(IMG_Animation *anim);
2132
+
2133
+ /**
2134
+ * Load a GIF animation directly.
2135
+ *
2136
+ * If you know you definitely have a GIF image, you can call this function,
2137
+ * which will skip SDL_image's file format detection routines. Generally it's
2138
+ * better to use the abstract interfaces; also, there is only an SDL_RWops
2139
+ * interface available here.
2140
+ *
2141
+ * \param src an SDL_RWops that data will be read from.
2142
+ * \returns a new IMG_Animation, or NULL on error.
2143
+ *
2144
+ * \since This function is available since SDL_image 2.6.0.
2145
+ *
2146
+ * \sa IMG_LoadAnimation
2147
+ * \sa IMG_LoadAnimation_RW
2148
+ * \sa IMG_LoadAnimationTyped_RW
2149
+ * \sa IMG_FreeAnimation
2150
+ */
2151
+ extern DECLSPEC IMG_Animation * SDLCALL IMG_LoadGIFAnimation_RW(SDL_RWops *src);
2152
+
2153
+ /**
2154
+ * Report SDL_image errors
2155
+ *
2156
+ * \sa IMG_GetError
2157
+ */
152
2158
  #define IMG_SetError SDL_SetError
2159
+
2160
+ /**
2161
+ * Get last SDL_image error
2162
+ *
2163
+ * \sa IMG_SetError
2164
+ */
153
2165
  #define IMG_GetError SDL_GetError
154
2166
 
155
2167
  /* Ends C function definitions when using C++ */