gdk_pixbuf2 1.0.3-x86-mingw32 → 1.1.0-x86-mingw32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. data/ext/gdk_pixbuf2/rbgdk-pixbuf-format.c +49 -40
  2. data/ext/gdk_pixbuf2/rbgdk-pixbuf-loader.c +50 -40
  3. data/ext/gdk_pixbuf2/rbgdk-pixbuf.c +250 -168
  4. data/ext/gdk_pixbuf2/rbgdk-pixbuf.h +25 -18
  5. data/ext/gdk_pixbuf2/rbgdk-pixbuf2conversions.h +42 -0
  6. data/ext/gdk_pixbuf2/rbgdk-pixbuf2private.h +35 -0
  7. data/ext/gdk_pixbuf2/rbgdk-pixbufanimation.c +46 -83
  8. data/ext/gdk_pixbuf2/rbgdk-pixbufanimationiter.c +71 -0
  9. data/ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c +29 -17
  10. data/ext/gdk_pixbuf2/rbgdk-pixdata.c +81 -77
  11. data/lib/1.8/gdk_pixbuf2.so +0 -0
  12. data/lib/1.9/gdk_pixbuf2.so +0 -0
  13. data/vendor/local/bin/gdk-pixbuf-csource.exe +0 -0
  14. data/vendor/local/bin/gdk-pixbuf-query-loaders.exe +0 -0
  15. data/vendor/local/bin/libgdk_pixbuf-2.0-0.dll +0 -0
  16. data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-animation.h +40 -0
  17. data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-core.h +200 -5
  18. data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-features.h +82 -3
  19. data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-io.h +170 -0
  20. data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-loader.h +6 -1
  21. data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h +5 -0
  22. data/vendor/local/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-transform.h +42 -1
  23. data/vendor/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache +2 -2
  24. data/vendor/local/lib/gdk_pixbuf-2.0.lib +0 -0
  25. data/vendor/local/lib/libgdk_pixbuf-2.0.dll.a +0 -0
  26. data/vendor/local/lib/pkgconfig/gdk-pixbuf-2.0.pc +4 -2
  27. data/vendor/local/manifest/{gdk-pixbuf-dev_2.22.1-1_win32.mft → gdk-pixbuf-dev_2.24.0-1_win32.mft} +12 -13
  28. data/vendor/local/manifest/{gdk-pixbuf_2.22.1-1_win32.mft → gdk-pixbuf_2.24.0-1_win32.mft} +2 -1
  29. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/GdkPixbufLoader.html +181 -150
  30. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/annotation-glossary.html +30 -9
  31. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-10.html +3 -3
  32. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-12.html +4 -4
  33. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-14.html +6 -6
  34. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-2.html +35 -3
  35. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-4.html +13 -9
  36. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-6.html +6 -6
  37. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-2-8.html +5 -5
  38. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-deprecated.html +7 -7
  39. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/api-index-full.html +251 -629
  40. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Animations.html +644 -0
  41. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-File-Loading.html +372 -0
  42. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-File-saving.html +642 -0
  43. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Image-Data-in-Memory.html +417 -0
  44. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Inline-data.html +495 -0
  45. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Module-Interface.html +485 -184
  46. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Reference-Counting-and-Memory-Mangement.html +168 -0
  47. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/{gdk-pixbuf-scaling.html → gdk-pixbuf-Scaling.html} +296 -190
  48. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html +617 -0
  49. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/{gdk-pixbuf-util.html → gdk-pixbuf-Utilities.html} +83 -93
  50. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Versioning.html +63 -26
  51. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-csource.html +16 -16
  52. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf-from-drawables.html +8 -8
  53. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf-rendering.html +8 -8
  54. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-query-loaders.html +12 -12
  55. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf.devhelp2 +149 -128
  56. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/index.html +18 -18
  57. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/index.sgml +184 -154
  58. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/license.html +3 -3
  59. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/rn01.html +18 -18
  60. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/rn02.html +5 -5
  61. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/style.css +2 -1
  62. data/vendor/local/share/locale/af/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  63. data/vendor/local/share/locale/ang/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  64. data/vendor/local/share/locale/ar/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  65. data/vendor/local/share/locale/as/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  66. data/vendor/local/share/locale/ast/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  67. data/vendor/local/share/locale/az/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  68. data/vendor/local/share/locale/be/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  69. data/vendor/local/share/locale/be@latin/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  70. data/vendor/local/share/locale/bg/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  71. data/vendor/local/share/locale/bn/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  72. data/vendor/local/share/locale/bn_IN/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  73. data/vendor/local/share/locale/br/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  74. data/vendor/local/share/locale/bs/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  75. data/vendor/local/share/locale/ca/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  76. data/vendor/local/share/locale/ca@valencia/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  77. data/vendor/local/share/locale/crh/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  78. data/vendor/local/share/locale/cs/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  79. data/vendor/local/share/locale/cy/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  80. data/vendor/local/share/locale/da/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  81. data/vendor/local/share/locale/de/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  82. data/vendor/local/share/locale/dz/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  83. data/vendor/local/share/locale/el/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  84. data/vendor/local/share/locale/en@shaw/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  85. data/vendor/local/share/locale/en_CA/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  86. data/vendor/local/share/locale/en_GB/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  87. data/vendor/local/share/locale/eo/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  88. data/vendor/local/share/locale/es/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  89. data/vendor/local/share/locale/et/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  90. data/vendor/local/share/locale/eu/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  91. data/vendor/local/share/locale/fa/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  92. data/vendor/local/share/locale/fi/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  93. data/vendor/local/share/locale/fr/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  94. data/vendor/local/share/locale/ga/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  95. data/vendor/local/share/locale/gl/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  96. data/vendor/local/share/locale/gu/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  97. data/vendor/local/share/locale/he/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  98. data/vendor/local/share/locale/hi/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  99. data/vendor/local/share/locale/hr/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  100. data/vendor/local/share/locale/hu/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  101. data/vendor/local/share/locale/hy/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  102. data/vendor/local/share/locale/ia/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  103. data/vendor/local/share/locale/id/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  104. data/vendor/local/share/locale/io/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  105. data/vendor/local/share/locale/is/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  106. data/vendor/local/share/locale/it/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  107. data/vendor/local/share/locale/ja/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  108. data/vendor/local/share/locale/ka/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  109. data/vendor/local/share/locale/kn/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  110. data/vendor/local/share/locale/ko/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  111. data/vendor/local/share/locale/ku/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  112. data/vendor/local/share/locale/li/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  113. data/vendor/local/share/locale/lt/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  114. data/vendor/local/share/locale/lv/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  115. data/vendor/local/share/locale/mai/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  116. data/vendor/local/share/locale/mi/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  117. data/vendor/local/share/locale/mk/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  118. data/vendor/local/share/locale/ml/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  119. data/vendor/local/share/locale/mn/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  120. data/vendor/local/share/locale/mr/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  121. data/vendor/local/share/locale/ms/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  122. data/vendor/local/share/locale/my/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  123. data/vendor/local/share/locale/nb/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  124. data/vendor/local/share/locale/nds/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  125. data/vendor/local/share/locale/ne/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  126. data/vendor/local/share/locale/nl/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  127. data/vendor/local/share/locale/nn/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  128. data/vendor/local/share/locale/nso/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  129. data/vendor/local/share/locale/oc/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  130. data/vendor/local/share/locale/or/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  131. data/vendor/local/share/locale/pa/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  132. data/vendor/local/share/locale/pl/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  133. data/vendor/local/share/locale/ps/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  134. data/vendor/local/share/locale/pt/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  135. data/vendor/local/share/locale/pt_BR/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  136. data/vendor/local/share/locale/ro/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  137. data/vendor/local/share/locale/ru/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  138. data/vendor/local/share/locale/si/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  139. data/vendor/local/share/locale/sk/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  140. data/vendor/local/share/locale/sl/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  141. data/vendor/local/share/locale/sq/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  142. data/vendor/local/share/locale/sr/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  143. data/vendor/local/share/locale/sr@ije/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  144. data/vendor/local/share/locale/sr@latin/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  145. data/vendor/local/share/locale/sv/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  146. data/vendor/local/share/locale/ta/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  147. data/vendor/local/share/locale/te/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  148. data/vendor/local/share/locale/th/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  149. data/vendor/local/share/locale/tk/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  150. data/vendor/local/share/locale/tr/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  151. data/vendor/local/share/locale/tt/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  152. data/vendor/local/share/locale/ug/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  153. data/vendor/local/share/locale/uk/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  154. data/vendor/local/share/locale/uz/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  155. data/vendor/local/share/locale/uz@cyrillic/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  156. data/vendor/local/share/locale/vi/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  157. data/vendor/local/share/locale/wa/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  158. data/vendor/local/share/locale/xh/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  159. data/vendor/local/share/locale/yi/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  160. data/vendor/local/share/locale/zh_CN/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  161. data/vendor/local/share/locale/zh_HK/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  162. data/vendor/local/share/locale/zh_TW/LC_MESSAGES/gdk-pixbuf.mo +0 -0
  163. data/vendor/local/share/man/man1/gdk-pixbuf-csource.1 +2 -2
  164. data/vendor/local/share/man/man1/gdk-pixbuf-query-loaders.1 +2 -2
  165. data/vendor/local/src/dieterv/packaging/gdk-pixbuf_2.24.0-1_win32.log +956 -0
  166. data/vendor/local/src/dieterv/packaging/gdk-pixbuf_2.24.0-1_win32.sh +97 -0
  167. metadata +26 -24
  168. data/ChangeLog +0 -482
  169. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-animation.html +0 -654
  170. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-creating.html +0 -406
  171. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-file-loading.html +0 -402
  172. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-file-saving.html +0 -685
  173. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html +0 -460
  174. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-inline.html +0 -516
  175. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-refcounting.html +0 -132
  176. data/vendor/local/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf.devhelp +0 -175
  177. data/vendor/local/src/tml/packaging/gdk-pixbuf_2.22.1-1_win32.log +0 -1012
  178. data/vendor/local/src/tml/packaging/gdk-pixbuf_2.22.1-1_win32.sh +0 -256
@@ -0,0 +1,417 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
+ <title>Image Data in Memory</title>
6
+ <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7
+ <link rel="home" href="index.html" title="GDK-PixBuf Reference Manual">
8
+ <link rel="up" href="rn01.html" title="API Reference">
9
+ <link rel="prev" href="gdk-pixbuf-File-saving.html" title="File saving">
10
+ <link rel="next" href="gdk-pixbuf-Inline-data.html" title="Inline data">
11
+ <meta name="generator" content="GTK-Doc V1.17.1 (XML mode)">
12
+ <link rel="stylesheet" href="style.css" type="text/css">
13
+ </head>
14
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
+ <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
16
+ <tr valign="middle">
17
+ <td><a accesskey="p" href="gdk-pixbuf-File-saving.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18
+ <td><a accesskey="u" href="rn01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19
+ <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20
+ <th width="100%" align="center">GDK-PixBuf Reference Manual</th>
21
+ <td><a accesskey="n" href="gdk-pixbuf-Inline-data.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22
+ </tr>
23
+ <tr><td colspan="5" class="shortcuts">
24
+ <a href="#gdk-pixbuf-Image-Data-in-Memory.synopsis" class="shortcut">Top</a>
25
+  | 
26
+ <a href="#gdk-pixbuf-Image-Data-in-Memory.description" class="shortcut">Description</a>
27
+ </td></tr>
28
+ </table>
29
+ <div class="refentry">
30
+ <a name="gdk-pixbuf-Image-Data-in-Memory"></a><div class="titlepage"></div>
31
+ <div class="refnamediv"><table width="100%"><tr>
32
+ <td valign="top">
33
+ <h2><span class="refentrytitle"><a name="gdk-pixbuf-Image-Data-in-Memory.top_of_page"></a>Image Data in Memory</span></h2>
34
+ <p>Image Data in Memory — Creating a pixbuf from image data that is already in memory.</p>
35
+ </td>
36
+ <td valign="top" align="right"></td>
37
+ </tr></table></div>
38
+ <div class="refsynopsisdiv">
39
+ <a name="gdk-pixbuf-Image-Data-in-Memory.synopsis"></a><h2>Synopsis</h2>
40
+ <pre class="synopsis">
41
+ #include &lt;gdk-pixbuf/gdk-pixbuf.h&gt;
42
+
43
+ <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new" title="gdk_pixbuf_new ()">gdk_pixbuf_new</a> (<em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkColorspace" title="enum GdkColorspace"><span class="type">GdkColorspace</span></a> colorspace</code></em>,
44
+ <em class="parameter"><code><span class="type">gboolean</span> has_alpha</code></em>,
45
+ <em class="parameter"><code><span class="type">int</span> bits_per_sample</code></em>,
46
+ <em class="parameter"><code><span class="type">int</span> width</code></em>,
47
+ <em class="parameter"><code><span class="type">int</span> height</code></em>);
48
+ <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new-from-data" title="gdk_pixbuf_new_from_data ()">gdk_pixbuf_new_from_data</a> (<em class="parameter"><code>const <span class="type">guchar</span> *data</code></em>,
49
+ <em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkColorspace" title="enum GdkColorspace"><span class="type">GdkColorspace</span></a> colorspace</code></em>,
50
+ <em class="parameter"><code><span class="type">gboolean</span> has_alpha</code></em>,
51
+ <em class="parameter"><code><span class="type">int</span> bits_per_sample</code></em>,
52
+ <em class="parameter"><code><span class="type">int</span> width</code></em>,
53
+ <em class="parameter"><code><span class="type">int</span> height</code></em>,
54
+ <em class="parameter"><code><span class="type">int</span> rowstride</code></em>,
55
+ <em class="parameter"><code><a class="link" href="gdk-pixbuf-Reference-Counting-and-Memory-Mangement.html#GdkPixbufDestroyNotify" title="GdkPixbufDestroyNotify ()"><span class="type">GdkPixbufDestroyNotify</span></a> destroy_fn</code></em>,
56
+ <em class="parameter"><code><span class="type">gpointer</span> destroy_fn_data</code></em>);
57
+ <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new-from-xpm-data" title="gdk_pixbuf_new_from_xpm_data ()">gdk_pixbuf_new_from_xpm_data</a> (<em class="parameter"><code>const <span class="type">char</span> **data</code></em>);
58
+ <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new-from-inline" title="gdk_pixbuf_new_from_inline ()">gdk_pixbuf_new_from_inline</a> (<em class="parameter"><code><span class="type">gint</span> data_length</code></em>,
59
+ <em class="parameter"><code>const <span class="type">guint8</span> *data</code></em>,
60
+ <em class="parameter"><code><span class="type">gboolean</span> copy_pixels</code></em>,
61
+ <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
62
+ <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new-subpixbuf" title="gdk_pixbuf_new_subpixbuf ()">gdk_pixbuf_new_subpixbuf</a> (<em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *src_pixbuf</code></em>,
63
+ <em class="parameter"><code><span class="type">int</span> src_x</code></em>,
64
+ <em class="parameter"><code><span class="type">int</span> src_y</code></em>,
65
+ <em class="parameter"><code><span class="type">int</span> width</code></em>,
66
+ <em class="parameter"><code><span class="type">int</span> height</code></em>);
67
+ <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-copy" title="gdk_pixbuf_copy ()">gdk_pixbuf_copy</a> (<em class="parameter"><code>const <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>);
68
+ </pre>
69
+ </div>
70
+ <div class="refsect1">
71
+ <a name="gdk-pixbuf-Image-Data-in-Memory.description"></a><h2>Description</h2>
72
+ <p>
73
+ The most basic way to create a pixbuf is to wrap an existing pixel
74
+ buffer with a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> structure. You can use the
75
+ <a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new-from-data" title="gdk_pixbuf_new_from_data ()"><code class="function">gdk_pixbuf_new_from_data()</code></a> function to do this You need to specify
76
+ the destroy notification function that will be called when the
77
+ data buffer needs to be freed; this will happen when a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>
78
+ is finalized by the reference counting functions If you have a
79
+ chunk of static data compiled into your application, you can pass
80
+ in <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> as the destroy notification function so that the data
81
+ will not be freed.
82
+ </p>
83
+ <p>
84
+ The <a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new" title="gdk_pixbuf_new ()"><code class="function">gdk_pixbuf_new()</code></a> function can be used as a convenience to
85
+ create a pixbuf with an empty buffer. This is equivalent to
86
+ allocating a data buffer using <code class="function"><code class="function">malloc()</code></code> and
87
+ then wrapping it with <a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new-from-data" title="gdk_pixbuf_new_from_data ()"><code class="function">gdk_pixbuf_new_from_data()</code></a>. The <a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new" title="gdk_pixbuf_new ()"><code class="function">gdk_pixbuf_new()</code></a>
88
+ function will compute an optimal rowstride so that rendering can be
89
+ performed with an efficient algorithm.
90
+ </p>
91
+ <p>
92
+ As a special case, you can use the <a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new-from-xpm-data" title="gdk_pixbuf_new_from_xpm_data ()"><code class="function">gdk_pixbuf_new_from_xpm_data()</code></a>
93
+ function to create a pixbuf from inline XPM image data.
94
+ </p>
95
+ <p>
96
+ You can also copy an existing pixbuf with the <a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-copy" title="gdk_pixbuf_copy ()"><code class="function">gdk_pixbuf_copy()</code></a>
97
+ function. This is not the same as just doing a <code class="function">g_object_ref()</code>
98
+ on the old pixbuf; the copy function will actually duplicate the
99
+ pixel data in memory and create a new <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> structure for it.
100
+ </p>
101
+ </div>
102
+ <div class="refsect1">
103
+ <a name="gdk-pixbuf-Image-Data-in-Memory.details"></a><h2>Details</h2>
104
+ <div class="refsect2">
105
+ <a name="gdk-pixbuf-new"></a><h3>gdk_pixbuf_new ()</h3>
106
+ <pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_new (<em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkColorspace" title="enum GdkColorspace"><span class="type">GdkColorspace</span></a> colorspace</code></em>,
107
+ <em class="parameter"><code><span class="type">gboolean</span> has_alpha</code></em>,
108
+ <em class="parameter"><code><span class="type">int</span> bits_per_sample</code></em>,
109
+ <em class="parameter"><code><span class="type">int</span> width</code></em>,
110
+ <em class="parameter"><code><span class="type">int</span> height</code></em>);</pre>
111
+ <p>
112
+ Creates a new <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> structure and allocates a buffer for it. The
113
+ buffer has an optimal rowstride. Note that the buffer is not cleared;
114
+ you will have to fill it completely yourself.
115
+ </p>
116
+ <div class="variablelist"><table border="0">
117
+ <col align="left" valign="top">
118
+ <tbody>
119
+ <tr>
120
+ <td><p><span class="term"><em class="parameter"><code>colorspace</code></em> :</span></p></td>
121
+ <td>Color space for image</td>
122
+ </tr>
123
+ <tr>
124
+ <td><p><span class="term"><em class="parameter"><code>has_alpha</code></em> :</span></p></td>
125
+ <td>Whether the image should have transparency information</td>
126
+ </tr>
127
+ <tr>
128
+ <td><p><span class="term"><em class="parameter"><code>bits_per_sample</code></em> :</span></p></td>
129
+ <td>Number of bits per color sample</td>
130
+ </tr>
131
+ <tr>
132
+ <td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
133
+ <td>Width of image in pixels, must be &gt; 0</td>
134
+ </tr>
135
+ <tr>
136
+ <td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
137
+ <td>Height of image in pixels, must be &gt; 0</td>
138
+ </tr>
139
+ <tr>
140
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
141
+ <td>A newly-created <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> with a reference count of 1, or
142
+ <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if not enough memory could be allocated for the image buffer.</td>
143
+ </tr>
144
+ </tbody>
145
+ </table></div>
146
+ </div>
147
+ <hr>
148
+ <div class="refsect2">
149
+ <a name="gdk-pixbuf-new-from-data"></a><h3>gdk_pixbuf_new_from_data ()</h3>
150
+ <pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_new_from_data (<em class="parameter"><code>const <span class="type">guchar</span> *data</code></em>,
151
+ <em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkColorspace" title="enum GdkColorspace"><span class="type">GdkColorspace</span></a> colorspace</code></em>,
152
+ <em class="parameter"><code><span class="type">gboolean</span> has_alpha</code></em>,
153
+ <em class="parameter"><code><span class="type">int</span> bits_per_sample</code></em>,
154
+ <em class="parameter"><code><span class="type">int</span> width</code></em>,
155
+ <em class="parameter"><code><span class="type">int</span> height</code></em>,
156
+ <em class="parameter"><code><span class="type">int</span> rowstride</code></em>,
157
+ <em class="parameter"><code><a class="link" href="gdk-pixbuf-Reference-Counting-and-Memory-Mangement.html#GdkPixbufDestroyNotify" title="GdkPixbufDestroyNotify ()"><span class="type">GdkPixbufDestroyNotify</span></a> destroy_fn</code></em>,
158
+ <em class="parameter"><code><span class="type">gpointer</span> destroy_fn_data</code></em>);</pre>
159
+ <p>
160
+ Creates a new <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> out of in-memory image data. Currently only RGB
161
+ images with 8 bits per sample are supported.
162
+ </p>
163
+ <div class="variablelist"><table border="0">
164
+ <col align="left" valign="top">
165
+ <tbody>
166
+ <tr>
167
+ <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
168
+ <td>Image data in 8-bit/sample packed format. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> char]</span>
169
+ </td>
170
+ </tr>
171
+ <tr>
172
+ <td><p><span class="term"><em class="parameter"><code>colorspace</code></em> :</span></p></td>
173
+ <td>Colorspace for the image data</td>
174
+ </tr>
175
+ <tr>
176
+ <td><p><span class="term"><em class="parameter"><code>has_alpha</code></em> :</span></p></td>
177
+ <td>Whether the data has an opacity channel</td>
178
+ </tr>
179
+ <tr>
180
+ <td><p><span class="term"><em class="parameter"><code>bits_per_sample</code></em> :</span></p></td>
181
+ <td>Number of bits per sample</td>
182
+ </tr>
183
+ <tr>
184
+ <td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
185
+ <td>Width of the image in pixels, must be &gt; 0</td>
186
+ </tr>
187
+ <tr>
188
+ <td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
189
+ <td>Height of the image in pixels, must be &gt; 0</td>
190
+ </tr>
191
+ <tr>
192
+ <td><p><span class="term"><em class="parameter"><code>rowstride</code></em> :</span></p></td>
193
+ <td>Distance in bytes between row starts</td>
194
+ </tr>
195
+ <tr>
196
+ <td><p><span class="term"><em class="parameter"><code>destroy_fn</code></em> :</span></p></td>
197
+ <td>Function used to free the data when the pixbuf's reference count
198
+ drops to zero, or <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if the data should not be freed. <span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span>
199
+ </td>
200
+ </tr>
201
+ <tr>
202
+ <td><p><span class="term"><em class="parameter"><code>destroy_fn_data</code></em> :</span></p></td>
203
+ <td>Closure data to pass to the destroy notification function. <span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span>
204
+ </td>
205
+ </tr>
206
+ <tr>
207
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
208
+ <td>A newly-created <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> structure with a reference count of 1. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
209
+ </td>
210
+ </tr>
211
+ </tbody>
212
+ </table></div>
213
+ </div>
214
+ <hr>
215
+ <div class="refsect2">
216
+ <a name="gdk-pixbuf-new-from-xpm-data"></a><h3>gdk_pixbuf_new_from_xpm_data ()</h3>
217
+ <pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_new_from_xpm_data (<em class="parameter"><code>const <span class="type">char</span> **data</code></em>);</pre>
218
+ <p>
219
+ Creates a new pixbuf by parsing XPM data in memory. This data is commonly
220
+ the result of including an XPM file into a program's C source.
221
+ </p>
222
+ <div class="variablelist"><table border="0">
223
+ <col align="left" valign="top">
224
+ <tbody>
225
+ <tr>
226
+ <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
227
+ <td>Pointer to inline XPM data.</td>
228
+ </tr>
229
+ <tr>
230
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
231
+ <td>A newly-created pixbuf with a reference count of 1.</td>
232
+ </tr>
233
+ </tbody>
234
+ </table></div>
235
+ </div>
236
+ <hr>
237
+ <div class="refsect2">
238
+ <a name="gdk-pixbuf-new-from-inline"></a><h3>gdk_pixbuf_new_from_inline ()</h3>
239
+ <pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_new_from_inline (<em class="parameter"><code><span class="type">gint</span> data_length</code></em>,
240
+ <em class="parameter"><code>const <span class="type">guint8</span> *data</code></em>,
241
+ <em class="parameter"><code><span class="type">gboolean</span> copy_pixels</code></em>,
242
+ <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
243
+ <p>
244
+ Create a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> from a flat representation that is suitable for
245
+ storing as inline data in a program. This is useful if you want to
246
+ ship a program with images, but don't want to depend on any
247
+ external files.
248
+ </p>
249
+ <p>
250
+ gdk-pixbuf ships with a program called <span class="command"><strong>gdk-pixbuf-csource</strong></span>
251
+ which allows for conversion of <a href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbufs</span></a> into such a inline representation.
252
+ In almost all cases, you should pass the <code class="option">--raw</code> flag to
253
+ <span class="command"><strong>gdk-pixbuf-csource</strong></span>. A sample invocation would be:
254
+ </p>
255
+ <p>
256
+ </p>
257
+ <div class="informalexample">
258
+ <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
259
+ <tbody>
260
+ <tr>
261
+ <td class="listing_lines" align="right"><pre>1</pre></td>
262
+ <td class="listing_code"><pre class="programlisting"><span class="normal">gdk</span><span class="symbol">-</span><span class="normal">pixbuf</span><span class="symbol">-</span><span class="normal">csource </span><span class="symbol">--</span><span class="normal">raw </span><span class="symbol">--</span><span class="normal">name</span><span class="symbol">=</span><span class="usertype">myimage_inline</span><span class="normal"> myimage</span><span class="symbol">.</span><span class="normal">png</span></pre></td>
263
+ </tr>
264
+ </tbody>
265
+ </table>
266
+ </div>
267
+
268
+ <p>
269
+ </p>
270
+ <p>
271
+ For the typical case where the inline pixbuf is read-only static data,
272
+ you don't need to copy the pixel data unless you intend to write to
273
+ it, so you can pass <code class="literal">FALSE</code> for <em class="parameter"><code>copy_pixels</code></em>. (If you pass
274
+ <code class="option">--rle</code> to <span class="command"><strong>gdk-pixbuf-csource</strong></span>, a copy
275
+ will be made even if <em class="parameter"><code>copy_pixels</code></em> is <code class="literal">FALSE</code>, so using this option is
276
+ generally a bad idea.)
277
+ </p>
278
+ <p>
279
+ If you create a pixbuf from const inline data compiled into your
280
+ program, it's probably safe to ignore errors and disable length checks,
281
+ since things will always succeed:
282
+ </p>
283
+ <div class="informalexample">
284
+ <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
285
+ <tbody>
286
+ <tr>
287
+ <td class="listing_lines" align="right"><pre>1</pre></td>
288
+ <td class="listing_code"><pre class="programlisting"><span class="normal">pixbuf </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new-from-inline">gdk_pixbuf_new_from_inline</a></span><span class="normal"> </span><span class="symbol">(-</span><span class="number">1</span><span class="symbol">,</span><span class="normal"> myimage_inline</span><span class="symbol">,</span><span class="normal"> FALSE</span><span class="symbol">,</span><span class="normal"> <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS">NULL</a></span><span class="symbol">);</span></pre></td>
289
+ </tr>
290
+ </tbody>
291
+ </table>
292
+ </div>
293
+
294
+ <p>
295
+ </p>
296
+ <p>
297
+ For non-const inline data, you could get out of memory. For untrusted
298
+ inline data located at runtime, you could have corrupt inline data in
299
+ addition.
300
+ </p>
301
+ <div class="variablelist"><table border="0">
302
+ <col align="left" valign="top">
303
+ <tbody>
304
+ <tr>
305
+ <td><p><span class="term"><em class="parameter"><code>data_length</code></em> :</span></p></td>
306
+ <td>Length in bytes of the <em class="parameter"><code>data</code></em> argument or -1 to
307
+ disable length checks</td>
308
+ </tr>
309
+ <tr>
310
+ <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
311
+ <td>Byte data containing a serialized <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structure</td>
312
+ </tr>
313
+ <tr>
314
+ <td><p><span class="term"><em class="parameter"><code>copy_pixels</code></em> :</span></p></td>
315
+ <td>Whether to copy the pixel data, or use direct pointers
316
+ <em class="parameter"><code>data</code></em> for the resulting pixbuf</td>
317
+ </tr>
318
+ <tr>
319
+ <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
320
+ <td>
321
+ <span class="type">GError</span> return location, may be <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> to ignore errors</td>
322
+ </tr>
323
+ <tr>
324
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
325
+ <td>A newly-created <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> structure with a reference,
326
+ count of 1, or <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if an error occurred.</td>
327
+ </tr>
328
+ </tbody>
329
+ </table></div>
330
+ </div>
331
+ <hr>
332
+ <div class="refsect2">
333
+ <a name="gdk-pixbuf-new-subpixbuf"></a><h3>gdk_pixbuf_new_subpixbuf ()</h3>
334
+ <pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_new_subpixbuf (<em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *src_pixbuf</code></em>,
335
+ <em class="parameter"><code><span class="type">int</span> src_x</code></em>,
336
+ <em class="parameter"><code><span class="type">int</span> src_y</code></em>,
337
+ <em class="parameter"><code><span class="type">int</span> width</code></em>,
338
+ <em class="parameter"><code><span class="type">int</span> height</code></em>);</pre>
339
+ <p>
340
+ Creates a new pixbuf which represents a sub-region of
341
+ <em class="parameter"><code>src_pixbuf</code></em>. The new pixbuf shares its pixels with the
342
+ original pixbuf, so writing to one affects both.
343
+ The new pixbuf holds a reference to <em class="parameter"><code>src_pixbuf</code></em>, so
344
+ <em class="parameter"><code>src_pixbuf</code></em> will not be finalized until the new pixbuf
345
+ is finalized.
346
+ </p>
347
+ <div class="variablelist"><table border="0">
348
+ <col align="left" valign="top">
349
+ <tbody>
350
+ <tr>
351
+ <td><p><span class="term"><em class="parameter"><code>src_pixbuf</code></em> :</span></p></td>
352
+ <td>a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>
353
+ </td>
354
+ </tr>
355
+ <tr>
356
+ <td><p><span class="term"><em class="parameter"><code>src_x</code></em> :</span></p></td>
357
+ <td>X coord in <em class="parameter"><code>src_pixbuf</code></em>
358
+ </td>
359
+ </tr>
360
+ <tr>
361
+ <td><p><span class="term"><em class="parameter"><code>src_y</code></em> :</span></p></td>
362
+ <td>Y coord in <em class="parameter"><code>src_pixbuf</code></em>
363
+ </td>
364
+ </tr>
365
+ <tr>
366
+ <td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
367
+ <td>width of region in <em class="parameter"><code>src_pixbuf</code></em>
368
+ </td>
369
+ </tr>
370
+ <tr>
371
+ <td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
372
+ <td>height of region in <em class="parameter"><code>src_pixbuf</code></em>
373
+ </td>
374
+ </tr>
375
+ <tr>
376
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
377
+ <td>a new pixbuf. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
378
+ </td>
379
+ </tr>
380
+ </tbody>
381
+ </table></div>
382
+ </div>
383
+ <hr>
384
+ <div class="refsect2">
385
+ <a name="gdk-pixbuf-copy"></a><h3>gdk_pixbuf_copy ()</h3>
386
+ <pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_copy (<em class="parameter"><code>const <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>);</pre>
387
+ <p>
388
+ Creates a new <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> with a copy of the information in the specified
389
+ <em class="parameter"><code>pixbuf</code></em>.
390
+ </p>
391
+ <div class="variablelist"><table border="0">
392
+ <col align="left" valign="top">
393
+ <tbody>
394
+ <tr>
395
+ <td><p><span class="term"><em class="parameter"><code>pixbuf</code></em> :</span></p></td>
396
+ <td>A pixbuf.</td>
397
+ </tr>
398
+ <tr>
399
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
400
+ <td>A newly-created pixbuf with a reference count of 1, or <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> if
401
+ not enough memory could be allocated. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
402
+ </td>
403
+ </tr>
404
+ </tbody>
405
+ </table></div>
406
+ </div>
407
+ </div>
408
+ <div class="refsect1">
409
+ <a name="gdk-pixbuf-Image-Data-in-Memory.see-also"></a><h2>See Also</h2>
410
+ gdk_pixbuf_finalize().
411
+ </div>
412
+ </div>
413
+ <div class="footer">
414
+ <hr>
415
+ Generated by GTK-Doc V1.17.1</div>
416
+ </body>
417
+ </html>
@@ -0,0 +1,495 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
+ <title>Inline data</title>
6
+ <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7
+ <link rel="home" href="index.html" title="GDK-PixBuf Reference Manual">
8
+ <link rel="up" href="rn01.html" title="API Reference">
9
+ <link rel="prev" href="gdk-pixbuf-Image-Data-in-Memory.html" title="Image Data in Memory">
10
+ <link rel="next" href="gdk-pixbuf-Scaling.html" title="Scaling">
11
+ <meta name="generator" content="GTK-Doc V1.17.1 (XML mode)">
12
+ <link rel="stylesheet" href="style.css" type="text/css">
13
+ </head>
14
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
+ <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
16
+ <tr valign="middle">
17
+ <td><a accesskey="p" href="gdk-pixbuf-Image-Data-in-Memory.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18
+ <td><a accesskey="u" href="rn01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19
+ <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20
+ <th width="100%" align="center">GDK-PixBuf Reference Manual</th>
21
+ <td><a accesskey="n" href="gdk-pixbuf-Scaling.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22
+ </tr>
23
+ <tr><td colspan="5" class="shortcuts">
24
+ <a href="#gdk-pixbuf-Inline-data.synopsis" class="shortcut">Top</a>
25
+  | 
26
+ <a href="#gdk-pixbuf-Inline-data.description" class="shortcut">Description</a>
27
+ </td></tr>
28
+ </table>
29
+ <div class="refentry">
30
+ <a name="gdk-pixbuf-Inline-data"></a><div class="titlepage"></div>
31
+ <div class="refnamediv"><table width="100%"><tr>
32
+ <td valign="top">
33
+ <h2><span class="refentrytitle"><a name="gdk-pixbuf-Inline-data.top_of_page"></a>Inline data</span></h2>
34
+ <p>Inline data — Functions for inlined pixbuf handling.</p>
35
+ </td>
36
+ <td valign="top" align="right"></td>
37
+ </tr></table></div>
38
+ <div class="refsynopsisdiv">
39
+ <a name="gdk-pixbuf-Inline-data.synopsis"></a><h2>Synopsis</h2>
40
+ <pre class="synopsis">
41
+ #include &lt;gdk-pixbuf/gdk-pixdata.h&gt;
42
+
43
+ struct <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata">GdkPixdata</a>;
44
+ enum <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdataType" title="enum GdkPixdataType">GdkPixdataType</a>;
45
+ enum <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdataDumpType" title="enum GdkPixdataDumpType">GdkPixdataDumpType</a>;
46
+ #define <a class="link" href="gdk-pixbuf-Inline-data.html#GDK-PIXBUF-MAGIC-NUMBER:CAPS" title="GDK_PIXBUF_MAGIC_NUMBER">GDK_PIXBUF_MAGIC_NUMBER</a>
47
+ #define <a class="link" href="gdk-pixbuf-Inline-data.html#GDK-PIXDATA-HEADER-LENGTH:CAPS" title="GDK_PIXDATA_HEADER_LENGTH">GDK_PIXDATA_HEADER_LENGTH</a>
48
+ <span class="returnvalue">gpointer</span> <a class="link" href="gdk-pixbuf-Inline-data.html#gdk-pixdata-from-pixbuf" title="gdk_pixdata_from_pixbuf ()">gdk_pixdata_from_pixbuf</a> (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> *pixdata</code></em>,
49
+ <em class="parameter"><code>const <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>,
50
+ <em class="parameter"><code><span class="type">gboolean</span> use_rle</code></em>);
51
+ <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="gdk-pixbuf-Inline-data.html#gdk-pixbuf-from-pixdata" title="gdk_pixbuf_from_pixdata ()">gdk_pixbuf_from_pixdata</a> (<em class="parameter"><code>const <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> *pixdata</code></em>,
52
+ <em class="parameter"><code><span class="type">gboolean</span> copy_pixels</code></em>,
53
+ <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
54
+ <span class="returnvalue">guint8</span> * <a class="link" href="gdk-pixbuf-Inline-data.html#gdk-pixdata-serialize" title="gdk_pixdata_serialize ()">gdk_pixdata_serialize</a> (<em class="parameter"><code>const <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> *pixdata</code></em>,
55
+ <em class="parameter"><code><span class="type">guint</span> *stream_length_p</code></em>);
56
+ <span class="returnvalue">gboolean</span> <a class="link" href="gdk-pixbuf-Inline-data.html#gdk-pixdata-deserialize" title="gdk_pixdata_deserialize ()">gdk_pixdata_deserialize</a> (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> *pixdata</code></em>,
57
+ <em class="parameter"><code><span class="type">guint</span> stream_length</code></em>,
58
+ <em class="parameter"><code>const <span class="type">guint8</span> *stream</code></em>,
59
+ <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
60
+ <span class="returnvalue">GString</span> * <a class="link" href="gdk-pixbuf-Inline-data.html#gdk-pixdata-to-csource" title="gdk_pixdata_to_csource ()">gdk_pixdata_to_csource</a> (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> *pixdata</code></em>,
61
+ <em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
62
+ <em class="parameter"><code><a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdataDumpType" title="enum GdkPixdataDumpType"><span class="type">GdkPixdataDumpType</span></a> dump_type</code></em>);
63
+ </pre>
64
+ </div>
65
+ <div class="refsect1">
66
+ <a name="gdk-pixbuf-Inline-data.description"></a><h2>Description</h2>
67
+ <p>
68
+ Using <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a>, images can be compiled into an application,
69
+ making it unnecessary to refer to external image files at runtime.
70
+ &amp;gdk-pixbuf; includes a utility named gdk-pixbuf-csource, which
71
+ can be used to convert image files into <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structures suitable
72
+ for inclusion in C sources. To convert the <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structures back
73
+ into <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>s, use gdk_pixbuf_from_pixdata.
74
+ </p>
75
+ </div>
76
+ <div class="refsect1">
77
+ <a name="gdk-pixbuf-Inline-data.details"></a><h2>Details</h2>
78
+ <div class="refsect2">
79
+ <a name="GdkPixdata"></a><h3>struct GdkPixdata</h3>
80
+ <pre class="programlisting">struct GdkPixdata {
81
+ guint32 magic; /* GDK_PIXBUF_MAGIC_NUMBER */
82
+ gint32 length; /* &lt;1 to disable length checks, otherwise:
83
+ * GDK_PIXDATA_HEADER_LENGTH + pixel_data length
84
+ */
85
+ guint32 pixdata_type; /* GdkPixdataType */
86
+ guint32 rowstride;
87
+ guint32 width;
88
+ guint32 height;
89
+ guint8 *pixel_data;
90
+ };
91
+ </pre>
92
+ <p>
93
+ A <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> contains pixbuf information in a form suitable for
94
+ serialization and streaming.
95
+ </p>
96
+ <div class="variablelist"><table border="0">
97
+ <col align="left" valign="top">
98
+ <tbody>
99
+ <tr>
100
+ <td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="GdkPixdata.magic"></a>magic</code></em>;</span></p></td>
101
+ <td>magic number. A valid <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structure must have
102
+ <a class="link" href="gdk-pixbuf-Inline-data.html#GDK-PIXBUF-MAGIC-NUMBER:CAPS" title="GDK_PIXBUF_MAGIC_NUMBER"><span class="type">GDK_PIXBUF_MAGIC_NUMBER</span></a> here.</td>
103
+ </tr>
104
+ <tr>
105
+ <td><p><span class="term"><span class="type">gint32</span> <em class="structfield"><code><a name="GdkPixdata.length"></a>length</code></em>;</span></p></td>
106
+ <td>less than 1 to disable length checks, otherwise
107
+ <a class="link" href="gdk-pixbuf-Inline-data.html#GDK-PIXDATA-HEADER-LENGTH:CAPS" title="GDK_PIXDATA_HEADER_LENGTH"><span class="type">GDK_PIXDATA_HEADER_LENGTH</span></a> + length of <em class="parameter"><code>pixel_data</code></em>.</td>
108
+ </tr>
109
+ <tr>
110
+ <td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="GdkPixdata.pixdata-type"></a>pixdata_type</code></em>;</span></p></td>
111
+ <td>information about colorspace, sample width and
112
+ encoding, in a <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdataType" title="enum GdkPixdataType"><span class="type">GdkPixdataType</span></a>.</td>
113
+ </tr>
114
+ <tr>
115
+ <td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="GdkPixdata.rowstride"></a>rowstride</code></em>;</span></p></td>
116
+ <td>Distance in bytes between rows.</td>
117
+ </tr>
118
+ <tr>
119
+ <td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="GdkPixdata.width"></a>width</code></em>;</span></p></td>
120
+ <td>Width of the image in pixels.</td>
121
+ </tr>
122
+ <tr>
123
+ <td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="GdkPixdata.height"></a>height</code></em>;</span></p></td>
124
+ <td>Height of the image in pixels.</td>
125
+ </tr>
126
+ <tr>
127
+ <td><p><span class="term"><span class="type">guint8</span> *<em class="structfield"><code><a name="GdkPixdata.pixel-data"></a>pixel_data</code></em>;</span></p></td>
128
+ <td>
129
+ <em class="parameter"><code>width</code></em> x <em class="parameter"><code>height</code></em> pixels, encoded according to <em class="parameter"><code>pixdata_type</code></em>
130
+ and <em class="parameter"><code>rowstride</code></em>.</td>
131
+ </tr>
132
+ </tbody>
133
+ </table></div>
134
+ </div>
135
+ <hr>
136
+ <div class="refsect2">
137
+ <a name="GdkPixdataType"></a><h3>enum GdkPixdataType</h3>
138
+ <pre class="programlisting">typedef enum
139
+ {
140
+ /* colorspace + alpha */
141
+ GDK_PIXDATA_COLOR_TYPE_RGB = 0x01,
142
+ GDK_PIXDATA_COLOR_TYPE_RGBA = 0x02,
143
+ GDK_PIXDATA_COLOR_TYPE_MASK = 0xff,
144
+ /* width, support 8bits only currently */
145
+ GDK_PIXDATA_SAMPLE_WIDTH_8 = 0x01 &lt;&lt; 16,
146
+ GDK_PIXDATA_SAMPLE_WIDTH_MASK = 0x0f &lt;&lt; 16,
147
+ /* encoding */
148
+ GDK_PIXDATA_ENCODING_RAW = 0x01 &lt;&lt; 24,
149
+ GDK_PIXDATA_ENCODING_RLE = 0x02 &lt;&lt; 24,
150
+ GDK_PIXDATA_ENCODING_MASK = 0x0f &lt;&lt; 24
151
+ } GdkPixdataType;
152
+ </pre>
153
+ <p>
154
+ An enumeration containing three sets of flags for a <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> struct:
155
+ one for the used colorspace, one for the width of the samples and one
156
+ for the encoding of the pixel data.
157
+ </p>
158
+ <div class="variablelist"><table border="0">
159
+ <col align="left" valign="top">
160
+ <tbody>
161
+ <tr>
162
+ <td><p><a name="GDK-PIXDATA-COLOR-TYPE-RGB:CAPS"></a><span class="term"><code class="literal">GDK_PIXDATA_COLOR_TYPE_RGB</code></span></p></td>
163
+ <td>each pixel has red, green and blue samples.
164
+ </td>
165
+ </tr>
166
+ <tr>
167
+ <td><p><a name="GDK-PIXDATA-COLOR-TYPE-RGBA:CAPS"></a><span class="term"><code class="literal">GDK_PIXDATA_COLOR_TYPE_RGBA</code></span></p></td>
168
+ <td>each pixel has red, green and blue samples
169
+ and an alpha value.
170
+ </td>
171
+ </tr>
172
+ <tr>
173
+ <td><p><a name="GDK-PIXDATA-COLOR-TYPE-MASK:CAPS"></a><span class="term"><code class="literal">GDK_PIXDATA_COLOR_TYPE_MASK</code></span></p></td>
174
+ <td>mask for the colortype flags of the enum.
175
+ </td>
176
+ </tr>
177
+ <tr>
178
+ <td><p><a name="GDK-PIXDATA-SAMPLE-WIDTH-8:CAPS"></a><span class="term"><code class="literal">GDK_PIXDATA_SAMPLE_WIDTH_8</code></span></p></td>
179
+ <td>each sample has 8 bits.
180
+ </td>
181
+ </tr>
182
+ <tr>
183
+ <td><p><a name="GDK-PIXDATA-SAMPLE-WIDTH-MASK:CAPS"></a><span class="term"><code class="literal">GDK_PIXDATA_SAMPLE_WIDTH_MASK</code></span></p></td>
184
+ <td>mask for the sample width flags of the enum.
185
+ </td>
186
+ </tr>
187
+ <tr>
188
+ <td><p><a name="GDK-PIXDATA-ENCODING-RAW:CAPS"></a><span class="term"><code class="literal">GDK_PIXDATA_ENCODING_RAW</code></span></p></td>
189
+ <td>the pixel data is in raw form.
190
+ </td>
191
+ </tr>
192
+ <tr>
193
+ <td><p><a name="GDK-PIXDATA-ENCODING-RLE:CAPS"></a><span class="term"><code class="literal">GDK_PIXDATA_ENCODING_RLE</code></span></p></td>
194
+ <td>the pixel data is run-length encoded. Runs may
195
+ be up to 127 bytes long; their length is stored in a single byte
196
+ preceding the pixel data for the run. If a run is constant, its length
197
+ byte has the high bit set and the pixel data consists of a single pixel
198
+ which must be repeated.
199
+ </td>
200
+ </tr>
201
+ <tr>
202
+ <td><p><a name="GDK-PIXDATA-ENCODING-MASK:CAPS"></a><span class="term"><code class="literal">GDK_PIXDATA_ENCODING_MASK</code></span></p></td>
203
+ <td>mask for the encoding flags of the enum.
204
+ </td>
205
+ </tr>
206
+ </tbody>
207
+ </table></div>
208
+ </div>
209
+ <hr>
210
+ <div class="refsect2">
211
+ <a name="GdkPixdataDumpType"></a><h3>enum GdkPixdataDumpType</h3>
212
+ <pre class="programlisting">typedef enum
213
+ {
214
+ /* type of source to save */
215
+ GDK_PIXDATA_DUMP_PIXDATA_STREAM = 0,
216
+ GDK_PIXDATA_DUMP_PIXDATA_STRUCT = 1,
217
+ GDK_PIXDATA_DUMP_MACROS = 2,
218
+ /* type of variables to use */
219
+ GDK_PIXDATA_DUMP_GTYPES = 0,
220
+ GDK_PIXDATA_DUMP_CTYPES = 1 &lt;&lt; 8,
221
+ GDK_PIXDATA_DUMP_STATIC = 1 &lt;&lt; 9,
222
+ GDK_PIXDATA_DUMP_CONST = 1 &lt;&lt; 10,
223
+ /* save RLE decoder macro? */
224
+ GDK_PIXDATA_DUMP_RLE_DECODER = 1 &lt;&lt; 16
225
+ } GdkPixdataDumpType;
226
+ </pre>
227
+ <p>
228
+ An enumeration which is used by <a class="link" href="gdk-pixbuf-Inline-data.html#gdk-pixdata-to-csource" title="gdk_pixdata_to_csource ()"><code class="function">gdk_pixdata_to_csource()</code></a> to
229
+ determine the form of C source to be generated. The three values
230
+ <em class="parameter"><code>GDK_PIXDATA_DUMP_PIXDATA_STREAM</code></em>, <em class="parameter"><code>GDK_PIXDATA_DUMP_PIXDATA_STRUCT</code></em>
231
+ and <em class="parameter"><code>GDK_PIXDATA_DUMP_MACROS</code></em> are mutually exclusive, as are
232
+ <em class="parameter"><code>GDK_PIXBUF_DUMP_GTYPES</code></em> and <em class="parameter"><code>GDK_PIXBUF_DUMP_CTYPES</code></em>. The remaining
233
+ elements are optional flags that can be freely added.
234
+ </p>
235
+ <div class="variablelist"><table border="0">
236
+ <col align="left" valign="top">
237
+ <tbody>
238
+ <tr>
239
+ <td><p><a name="GDK-PIXDATA-DUMP-PIXDATA-STREAM:CAPS"></a><span class="term"><code class="literal">GDK_PIXDATA_DUMP_PIXDATA_STREAM</code></span></p></td>
240
+ <td>Generate pixbuf data stream (a single
241
+ string containing a serialized <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structure in network byte
242
+ order).
243
+ </td>
244
+ </tr>
245
+ <tr>
246
+ <td><p><a name="GDK-PIXDATA-DUMP-PIXDATA-STRUCT:CAPS"></a><span class="term"><code class="literal">GDK_PIXDATA_DUMP_PIXDATA_STRUCT</code></span></p></td>
247
+ <td>Generate <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structure (needs
248
+ the <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structure definition from gdk-pixdata.h).
249
+ </td>
250
+ </tr>
251
+ <tr>
252
+ <td><p><a name="GDK-PIXDATA-DUMP-MACROS:CAPS"></a><span class="term"><code class="literal">GDK_PIXDATA_DUMP_MACROS</code></span></p></td>
253
+ <td>Generate <code class="function">*_ROWSTRIDE</code>,
254
+ <code class="function">*_WIDTH</code>, <code class="function">*_HEIGHT</code>,
255
+ <code class="function">*_BYTES_PER_PIXEL</code> and
256
+ <code class="function">*_RLE_PIXEL_DATA</code> or <code class="function">*_PIXEL_DATA</code>
257
+ macro definitions for the image.
258
+ </td>
259
+ </tr>
260
+ <tr>
261
+ <td><p><a name="GDK-PIXDATA-DUMP-GTYPES:CAPS"></a><span class="term"><code class="literal">GDK_PIXDATA_DUMP_GTYPES</code></span></p></td>
262
+ <td>Generate GLib data types instead of
263
+ standard C data types.
264
+ </td>
265
+ </tr>
266
+ <tr>
267
+ <td><p><a name="GDK-PIXDATA-DUMP-CTYPES:CAPS"></a><span class="term"><code class="literal">GDK_PIXDATA_DUMP_CTYPES</code></span></p></td>
268
+ <td>Generate standard C data types instead of
269
+ GLib data types.
270
+ </td>
271
+ </tr>
272
+ <tr>
273
+ <td><p><a name="GDK-PIXDATA-DUMP-STATIC:CAPS"></a><span class="term"><code class="literal">GDK_PIXDATA_DUMP_STATIC</code></span></p></td>
274
+ <td>Generate static symbols.
275
+ </td>
276
+ </tr>
277
+ <tr>
278
+ <td><p><a name="GDK-PIXDATA-DUMP-CONST:CAPS"></a><span class="term"><code class="literal">GDK_PIXDATA_DUMP_CONST</code></span></p></td>
279
+ <td>Generate const symbols.
280
+ </td>
281
+ </tr>
282
+ <tr>
283
+ <td><p><a name="GDK-PIXDATA-DUMP-RLE-DECODER:CAPS"></a><span class="term"><code class="literal">GDK_PIXDATA_DUMP_RLE_DECODER</code></span></p></td>
284
+ <td>Provide a <code class="function">*_RUN_LENGTH_DECODE(image_buf, rle_data, size, bpp)</code>
285
+ macro definition to decode run-length encoded image data.
286
+ </td>
287
+ </tr>
288
+ </tbody>
289
+ </table></div>
290
+ </div>
291
+ <hr>
292
+ <div class="refsect2">
293
+ <a name="GDK-PIXBUF-MAGIC-NUMBER:CAPS"></a><h3>GDK_PIXBUF_MAGIC_NUMBER</h3>
294
+ <pre class="programlisting">#define GDK_PIXBUF_MAGIC_NUMBER (0x47646b50) /* 'GdkP' */
295
+ </pre>
296
+ <p>
297
+ Magic number for <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structures.
298
+ </p>
299
+ </div>
300
+ <hr>
301
+ <div class="refsect2">
302
+ <a name="GDK-PIXDATA-HEADER-LENGTH:CAPS"></a><h3>GDK_PIXDATA_HEADER_LENGTH</h3>
303
+ <pre class="programlisting">#define GDK_PIXDATA_HEADER_LENGTH (4 + 4 + 4 + 4 + 4 + 4)
304
+ </pre>
305
+ <p>
306
+ The length of a <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structure without the <em class="parameter"><code>pixel_data</code></em> pointer.
307
+ </p>
308
+ </div>
309
+ <hr>
310
+ <div class="refsect2">
311
+ <a name="gdk-pixdata-from-pixbuf"></a><h3>gdk_pixdata_from_pixbuf ()</h3>
312
+ <pre class="programlisting"><span class="returnvalue">gpointer</span> gdk_pixdata_from_pixbuf (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> *pixdata</code></em>,
313
+ <em class="parameter"><code>const <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>,
314
+ <em class="parameter"><code><span class="type">gboolean</span> use_rle</code></em>);</pre>
315
+ <p>
316
+ Converts a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> to a <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a>. If <em class="parameter"><code>use_rle</code></em> is <code class="literal">TRUE</code>, the
317
+ pixel data is run-length encoded into newly-allocated memory and a
318
+ pointer to that memory is returned.
319
+ </p>
320
+ <div class="variablelist"><table border="0">
321
+ <col align="left" valign="top">
322
+ <tbody>
323
+ <tr>
324
+ <td><p><span class="term"><em class="parameter"><code>pixdata</code></em> :</span></p></td>
325
+ <td>a <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> to fill.</td>
326
+ </tr>
327
+ <tr>
328
+ <td><p><span class="term"><em class="parameter"><code>pixbuf</code></em> :</span></p></td>
329
+ <td>the data to fill <em class="parameter"><code>pixdata</code></em> with.</td>
330
+ </tr>
331
+ <tr>
332
+ <td><p><span class="term"><em class="parameter"><code>use_rle</code></em> :</span></p></td>
333
+ <td>whether to use run-length encoding for the pixel data.</td>
334
+ </tr>
335
+ <tr>
336
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
337
+ <td>If <em class="parameter"><code>ure_rle</code></em> is <code class="literal">TRUE</code>, a pointer to the newly-allocated memory
338
+ for the run-length encoded pixel data, otherwise <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>.</td>
339
+ </tr>
340
+ </tbody>
341
+ </table></div>
342
+ </div>
343
+ <hr>
344
+ <div class="refsect2">
345
+ <a name="gdk-pixbuf-from-pixdata"></a><h3>gdk_pixbuf_from_pixdata ()</h3>
346
+ <pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gdk_pixbuf_from_pixdata (<em class="parameter"><code>const <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> *pixdata</code></em>,
347
+ <em class="parameter"><code><span class="type">gboolean</span> copy_pixels</code></em>,
348
+ <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
349
+ <p>
350
+ Converts a <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> to a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>. If <em class="parameter"><code>copy_pixels</code></em> is <code class="literal">TRUE</code> or
351
+ if the pixel data is run-length-encoded, the pixel data is copied into
352
+ newly-allocated memory; otherwise it is reused.
353
+ </p>
354
+ <div class="variablelist"><table border="0">
355
+ <col align="left" valign="top">
356
+ <tbody>
357
+ <tr>
358
+ <td><p><span class="term"><em class="parameter"><code>pixdata</code></em> :</span></p></td>
359
+ <td>a <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> to convert into a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>.</td>
360
+ </tr>
361
+ <tr>
362
+ <td><p><span class="term"><em class="parameter"><code>copy_pixels</code></em> :</span></p></td>
363
+ <td>whether to copy raw pixel data; run-length encoded
364
+ pixel data is always copied.</td>
365
+ </tr>
366
+ <tr>
367
+ <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
368
+ <td>location to store possible errors.</td>
369
+ </tr>
370
+ <tr>
371
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
372
+ <td>a new <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>.</td>
373
+ </tr>
374
+ </tbody>
375
+ </table></div>
376
+ </div>
377
+ <hr>
378
+ <div class="refsect2">
379
+ <a name="gdk-pixdata-serialize"></a><h3>gdk_pixdata_serialize ()</h3>
380
+ <pre class="programlisting"><span class="returnvalue">guint8</span> * gdk_pixdata_serialize (<em class="parameter"><code>const <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> *pixdata</code></em>,
381
+ <em class="parameter"><code><span class="type">guint</span> *stream_length_p</code></em>);</pre>
382
+ <p>
383
+ Serializes a <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structure into a byte stream.
384
+ The byte stream consists of a straightforward writeout of the
385
+ <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> fields in network byte order, plus the <em class="parameter"><code>pixel_data</code></em>
386
+ bytes the structure points to.
387
+ </p>
388
+ <div class="variablelist"><table border="0">
389
+ <col align="left" valign="top">
390
+ <tbody>
391
+ <tr>
392
+ <td><p><span class="term"><em class="parameter"><code>pixdata</code></em> :</span></p></td>
393
+ <td>a valid <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structure to serialize.</td>
394
+ </tr>
395
+ <tr>
396
+ <td><p><span class="term"><em class="parameter"><code>stream_length_p</code></em> :</span></p></td>
397
+ <td>location to store the resulting stream length in.</td>
398
+ </tr>
399
+ <tr>
400
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
401
+ <td>A newly-allocated string containing the serialized
402
+ <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structure.</td>
403
+ </tr>
404
+ </tbody>
405
+ </table></div>
406
+ </div>
407
+ <hr>
408
+ <div class="refsect2">
409
+ <a name="gdk-pixdata-deserialize"></a><h3>gdk_pixdata_deserialize ()</h3>
410
+ <pre class="programlisting"><span class="returnvalue">gboolean</span> gdk_pixdata_deserialize (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> *pixdata</code></em>,
411
+ <em class="parameter"><code><span class="type">guint</span> stream_length</code></em>,
412
+ <em class="parameter"><code>const <span class="type">guint8</span> *stream</code></em>,
413
+ <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
414
+ <p>
415
+ Deserializes (reconstruct) a <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structure from a byte stream.
416
+ The byte stream consists of a straightforward writeout of the
417
+ <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> fields in network byte order, plus the <em class="parameter"><code>pixel_data</code></em>
418
+ bytes the structure points to.
419
+ The <em class="parameter"><code>pixdata</code></em> contents are reconstructed byte by byte and are checked
420
+ for validity. This function may fail with <code class="literal">GDK_PIXBUF_CORRUPT_IMAGE</code>
421
+ or <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GDK-PIXBUF-ERROR-UNKNOWN-TYPE:CAPS"><code class="literal">GDK_PIXBUF_ERROR_UNKNOWN_TYPE</code></a>.
422
+ </p>
423
+ <div class="variablelist"><table border="0">
424
+ <col align="left" valign="top">
425
+ <tbody>
426
+ <tr>
427
+ <td><p><span class="term"><em class="parameter"><code>pixdata</code></em> :</span></p></td>
428
+ <td>a <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structure to be filled in.</td>
429
+ </tr>
430
+ <tr>
431
+ <td><p><span class="term"><em class="parameter"><code>stream_length</code></em> :</span></p></td>
432
+ <td>length of the stream used for deserialization.</td>
433
+ </tr>
434
+ <tr>
435
+ <td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
436
+ <td>stream of bytes containing a serialized <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> structure.</td>
437
+ </tr>
438
+ <tr>
439
+ <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
440
+ <td>
441
+ <span class="type">GError</span> location to indicate failures (maybe <a href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> to ignore errors).</td>
442
+ </tr>
443
+ <tr>
444
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
445
+ <td>Upon successful deserialization <code class="literal">TRUE</code> is returned,
446
+ <code class="literal">FALSE</code> otherwise.</td>
447
+ </tr>
448
+ </tbody>
449
+ </table></div>
450
+ </div>
451
+ <hr>
452
+ <div class="refsect2">
453
+ <a name="gdk-pixdata-to-csource"></a><h3>gdk_pixdata_to_csource ()</h3>
454
+ <pre class="programlisting"><span class="returnvalue">GString</span> * gdk_pixdata_to_csource (<em class="parameter"><code><a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> *pixdata</code></em>,
455
+ <em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
456
+ <em class="parameter"><code><a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdataDumpType" title="enum GdkPixdataDumpType"><span class="type">GdkPixdataDumpType</span></a> dump_type</code></em>);</pre>
457
+ <p>
458
+ Generates C source code suitable for compiling images directly
459
+ into programs.
460
+ </p>
461
+ <p>
462
+ gdk-pixbuf ships with a program called <span class="command"><strong>gdk-pixbuf-csource</strong></span>
463
+ which offers a command line interface to this function.
464
+ </p>
465
+ <div class="variablelist"><table border="0">
466
+ <col align="left" valign="top">
467
+ <tbody>
468
+ <tr>
469
+ <td><p><span class="term"><em class="parameter"><code>pixdata</code></em> :</span></p></td>
470
+ <td>a <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdata" title="struct GdkPixdata"><span class="type">GdkPixdata</span></a> to convert to C source.</td>
471
+ </tr>
472
+ <tr>
473
+ <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
474
+ <td>used for naming generated data structures or macros.</td>
475
+ </tr>
476
+ <tr>
477
+ <td><p><span class="term"><em class="parameter"><code>dump_type</code></em> :</span></p></td>
478
+ <td>a <a class="link" href="gdk-pixbuf-Inline-data.html#GdkPixdataDumpType" title="enum GdkPixdataDumpType"><span class="type">GdkPixdataDumpType</span></a> determining the kind of C
479
+ source to be generated.</td>
480
+ </tr>
481
+ <tr>
482
+ <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
483
+ <td>a newly-allocated string containing the C source form
484
+ of <em class="parameter"><code>pixdata</code></em>.</td>
485
+ </tr>
486
+ </tbody>
487
+ </table></div>
488
+ </div>
489
+ </div>
490
+ </div>
491
+ <div class="footer">
492
+ <hr>
493
+ Generated by GTK-Doc V1.17.1</div>
494
+ </body>
495
+ </html>