1<root>
2<function name="gdk_pixbuf_loader_new_with_mime_type">
3<description>
4Creates a new pixbuf loader object that always attempts to parse
5image data as if it were an image of mime type @mime_type, instead of
6identifying the type automatically. Useful if you want an error if
7the image isn't the expected mime type, for loading image formats
8that can't be reliably identified by looking at the data, or if
9the user manually forces a specific mime type.
10
11The list of supported mime types depends on what image loaders
12are installed, but typically &quot;image/png&quot;, &quot;image/jpeg&quot;, &quot;image/gif&quot;,
13&quot;image/tiff&quot; and &quot;image/x-xpixmap&quot; are among the supported mime types.
14To obtain the full list of supported mime types, call
15gdk_pixbuf_format_get_mime_types() on each of the #GdkPixbufFormat
16structs returned by gdk_pixbuf_get_formats().
17
18Since: 2.4
19
20</description>
21<parameters>
22<parameter name="mime_type">
23<parameter_description> the mime type to be loaded
24</parameter_description>
25</parameter>
26<parameter name="error">
27<parameter_description> return location for an allocated #GError, or %NULL to ignore errors
28</parameter_description>
29</parameter>
30</parameters>
31<return> A newly-created pixbuf loader.
32</return>
33</function>
34
35<function name="gdk_pixbuf_get_pixels">
36<description>
37Queries a pointer to the pixel data of a pixbuf.
38
39
40</description>
41<parameters>
42<parameter name="pixbuf">
43<parameter_description> A pixbuf.
44</parameter_description>
45</parameter>
46</parameters>
47<return> A pointer to the pixbuf's pixel data.  Please see &lt;xref linkend=&quot;image-data&quot;/&gt;
48for information about how the pixel data is stored in
49memory.
50</return>
51</function>
52
53<function name="gdk_pixbuf_format_set_disabled">
54<description>
55Disables or enables an image format. If a format is disabled,
56gdk-pixbuf won't use the image loader for this format to load
57images. Applications can use this to avoid using image loaders
58with an inappropriate license, see gdk_pixbuf_format_get_license().
59
60Since: 2.6
61
62</description>
63<parameters>
64<parameter name="format">
65<parameter_description> a #GdkPixbufFormat
66</parameter_description>
67</parameter>
68<parameter name="disabled">
69<parameter_description> %TRUE to disable the format @format
70</parameter_description>
71</parameter>
72</parameters>
73<return></return>
74</function>
75
76<function name="gdk_pixbuf_format_is_disabled">
77<description>
78Returns whether this image format is disabled. See
79gdk_pixbuf_format_set_disabled().
80
81Since: 2.6
82
83</description>
84<parameters>
85<parameter name="format">
86<parameter_description> a #GdkPixbufFormat
87</parameter_description>
88</parameter>
89</parameters>
90<return> whether this image format is disabled.
91
92</return>
93</function>
94
95<function name="gdk_pixbuf_get_n_channels">
96<description>
97Queries the number of channels of a pixbuf.
98
99
100</description>
101<parameters>
102<parameter name="pixbuf">
103<parameter_description> A pixbuf.
104</parameter_description>
105</parameter>
106</parameters>
107<return> Number of channels.
108</return>
109</function>
110
111<function name="gdk_pixbuf_save_to_stream">
112<description>
113Saves @pixbuf to an output stream.
114
115Supported file formats are currently &quot;jpeg&quot;, &quot;tiff&quot;, &quot;png&quot;, &quot;ico&quot; or
116&quot;bmp&quot;. See gdk_pixbuf_save_to_buffer() for more details.
117
118The @cancellable can be used to abort the operation from another
119thread. If the operation was cancelled, the error %GIO_ERROR_CANCELLED
120will be returned. Other possible errors are in the #GDK_PIXBUF_ERROR
121and %G_IO_ERROR domains.
122
123The stream is not closed.
124
125Since: 2.14
126
127</description>
128<parameters>
129<parameter name="pixbuf">
130<parameter_description> a #GdkPixbuf
131</parameter_description>
132</parameter>
133<parameter name="stream">
134<parameter_description> a #GOutputStream to save the pixbuf to
135</parameter_description>
136</parameter>
137<parameter name="type">
138<parameter_description> name of file format
139</parameter_description>
140</parameter>
141<parameter name="cancellable">
142<parameter_description> optional #GCancellable object, %NULL to ignore
143</parameter_description>
144</parameter>
145<parameter name="error">
146<parameter_description> return location for error, or %NULL
147</parameter_description>
148</parameter>
149<parameter name="Varargs">
150<parameter_description> list of key-value save options
151</parameter_description>
152</parameter>
153</parameters>
154<return> %TRUE if the pixbuf was saved successfully, %FALSE if an
155error was set.
156
157</return>
158</function>
159
160<function name="gdk_pixbuf_save_to_buffer">
161<description>
162Saves pixbuf to a new buffer in format @type, which is currently &quot;jpeg&quot;,
163&quot;png&quot;, &quot;tiff&quot;, &quot;ico&quot; or &quot;bmp&quot;.  This is a convenience function that uses
164gdk_pixbuf_save_to_callback() to do the real work. Note that the buffer
165is not nul-terminated and may contain embedded  nuls.
166If @error is set, %FALSE will be returned and @buffer will be set to
167%NULL. Possible errors include those in the #GDK_PIXBUF_ERROR
168domain.
169
170See gdk_pixbuf_save() for more details.
171
172Since: 2.4
173
174</description>
175<parameters>
176<parameter name="pixbuf">
177<parameter_description> a #GdkPixbuf.
178</parameter_description>
179</parameter>
180<parameter name="buffer">
181<parameter_description> location to receive a pointer to the new buffer.
182</parameter_description>
183</parameter>
184<parameter name="buffer_size">
185<parameter_description> location to receive the size of the new buffer.
186</parameter_description>
187</parameter>
188<parameter name="type">
189<parameter_description> name of file format.
190</parameter_description>
191</parameter>
192<parameter name="error">
193<parameter_description> return location for error, or %NULL
194</parameter_description>
195</parameter>
196<parameter name="Varargs">
197<parameter_description> list of key-value save options
198</parameter_description>
199</parameter>
200</parameters>
201<return> whether an error was set
202
203</return>
204</function>
205
206<function name="gdk_pixbuf_rotate_simple">
207<description>
208Rotates a pixbuf by a multiple of 90 degrees, and returns the
209result in a new pixbuf.
210
211Since: 2.6
212
213</description>
214<parameters>
215<parameter name="src">
216<parameter_description> a #GdkPixbuf
217</parameter_description>
218</parameter>
219<parameter name="angle">
220<parameter_description> the angle to rotate by
221</parameter_description>
222</parameter>
223</parameters>
224<return> the new #GdkPixbuf, or %NULL if not enough memory could be
225allocated for it.
226
227</return>
228</function>
229
230<function name="gdk_pixbuf_format_is_writable">
231<description>
232Returns whether pixbufs can be saved in the given format.
233
234Since: 2.2
235
236</description>
237<parameters>
238<parameter name="format">
239<parameter_description> a #GdkPixbufFormat
240</parameter_description>
241</parameter>
242</parameters>
243<return> whether pixbufs can be saved in the given format.
244
245</return>
246</function>
247
248<function name="gdk_pixbuf_get_rowstride">
249<description>
250Queries the rowstride of a pixbuf, which is the number of bytes between the start of a row
251and the start of the next row.
252
253
254</description>
255<parameters>
256<parameter name="pixbuf">
257<parameter_description> A pixbuf.
258</parameter_description>
259</parameter>
260</parameters>
261<return> Distance between row starts.
262</return>
263</function>
264
265<function name="gdk_pixbuf_animation_get_height">
266<description>
267Queries the height of the bounding box of a pixbuf animation.
268
269
270</description>
271<parameters>
272<parameter name="animation">
273<parameter_description> An animation.
274</parameter_description>
275</parameter>
276</parameters>
277<return> Height of the bounding box of the animation.
278</return>
279</function>
280
281<function name="gdk_pixbuf_new_from_stream_at_scale">
282<description>
283Creates a new pixbuf by loading an image from an input stream.
284
285The file format is detected automatically. If %NULL is returned, then
286@error will be set. The @cancellable can be used to abort the operation
287from another thread. If the operation was cancelled, the error
288%GIO_ERROR_CANCELLED will be returned. Other possible errors are in
289the #GDK_PIXBUF_ERROR and %G_IO_ERROR domains.
290
291The image will be scaled to fit in the requested size, optionally
292preserving the image's aspect ratio. When preserving the aspect ratio,
293a @width of -1 will cause the image to be scaled to the exact given
294height, and a @height of -1 will cause the image to be scaled to the
295exact given width. When not preserving aspect ratio, a @width or
296@height of -1 means to not scale the image at all in that dimension.
297
298The stream is not closed.
299
300Since: 2.14
301
302</description>
303<parameters>
304<parameter name="stream">
305<parameter_description>  a #GInputStream to load the pixbuf from
306</parameter_description>
307</parameter>
308<parameter name="width">
309<parameter_description> The width the image should have or -1 to not constrain the width
310</parameter_description>
311</parameter>
312<parameter name="height">
313<parameter_description> The height the image should have or -1 to not constrain the height
314</parameter_description>
315</parameter>
316<parameter name="preserve_aspect_ratio">
317<parameter_description> %TRUE to preserve the image's aspect ratio
318</parameter_description>
319</parameter>
320<parameter name="cancellable">
321<parameter_description> optional #GCancellable object, %NULL to ignore
322</parameter_description>
323</parameter>
324<parameter name="error">
325<parameter_description> Return location for an error
326</parameter_description>
327</parameter>
328</parameters>
329<return> A newly-created pixbuf, or %NULL if any of several error
330conditions occurred: the file could not be opened, the image format is
331not supported, there was not enough memory to allocate the image buffer,
332the stream contained invalid data, or the operation was cancelled.
333
334</return>
335</function>
336
337<function name="gdk_pixbuf_animation_get_width">
338<description>
339Queries the width of the bounding box of a pixbuf animation.
340
341
342</description>
343<parameters>
344<parameter name="animation">
345<parameter_description> An animation.
346</parameter_description>
347</parameter>
348</parameters>
349<return> Width of the bounding box of the animation.
350</return>
351</function>
352
353<function name="gdk_pixbuf_loader_write">
354<description>
355This will cause a pixbuf loader to parse the next @count bytes of
356an image.  It will return %TRUE if the data was loaded successfully,
357and %FALSE if an error occurred.  In the latter case, the loader
358will be closed, and will not accept further writes. If %FALSE is
359returned, @error will be set to an error from the #GDK_PIXBUF_ERROR
360or #G_FILE_ERROR domains.
361
362
363</description>
364<parameters>
365<parameter name="loader">
366<parameter_description> A pixbuf loader.
367</parameter_description>
368</parameter>
369<parameter name="buf">
370<parameter_description> Pointer to image data.
371</parameter_description>
372</parameter>
373<parameter name="count">
374<parameter_description> Length of the @buf buffer in bytes.
375</parameter_description>
376</parameter>
377<parameter name="error">
378<parameter_description> return location for errors
379</parameter_description>
380</parameter>
381</parameters>
382<return> %TRUE if the write was successful, or %FALSE if the loader
383cannot parse the buffer.
384</return>
385</function>
386
387<function name="gdk_pixbuf_loader_get_format">
388<description>
389Obtains the available information about the format of the
390currently loading image file.
391
392Since: 2.2
393
394</description>
395<parameters>
396<parameter name="loader">
397<parameter_description> A pixbuf loader.
398</parameter_description>
399</parameter>
400</parameters>
401<return> A #GdkPixbufFormat or %NULL. The return value is owned
402by GdkPixbuf and should not be freed.
403
404</return>
405</function>
406
407<function name="gdk_pixbuf_new_from_data">
408<description>
409Creates a new #GdkPixbuf out of in-memory image data.  Currently only RGB
410images with 8 bits per sample are supported.
411
412
413</description>
414<parameters>
415<parameter name="data">
416<parameter_description> Image data in 8-bit/sample packed format
417</parameter_description>
418</parameter>
419<parameter name="colorspace">
420<parameter_description> Colorspace for the image data
421</parameter_description>
422</parameter>
423<parameter name="has_alpha">
424<parameter_description> Whether the data has an opacity channel
425</parameter_description>
426</parameter>
427<parameter name="bits_per_sample">
428<parameter_description> Number of bits per sample
429</parameter_description>
430</parameter>
431<parameter name="width">
432<parameter_description> Width of the image in pixels, must be &gt; 0
433</parameter_description>
434</parameter>
435<parameter name="height">
436<parameter_description> Height of the image in pixels, must be &gt; 0
437</parameter_description>
438</parameter>
439<parameter name="rowstride">
440<parameter_description> Distance in bytes between row starts
441</parameter_description>
442</parameter>
443<parameter name="destroy_fn">
444<parameter_description> Function used to free the data when the pixbuf's reference count
445drops to zero, or %NULL if the data should not be freed
446</parameter_description>
447</parameter>
448<parameter name="destroy_fn_data">
449<parameter_description> Closure data to pass to the destroy notification function
450</parameter_description>
451</parameter>
452</parameters>
453<return> A newly-created #GdkPixbuf structure with a reference count of 1.
454</return>
455</function>
456
457<function name="gdk_pixbuf_animation_iter_get_pixbuf">
458<description>
459Gets the current pixbuf which should be displayed; the pixbuf will
460be the same size as the animation itself
461(gdk_pixbuf_animation_get_width(), gdk_pixbuf_animation_get_height()).
462This pixbuf should be displayed for
463gdk_pixbuf_animation_iter_get_delay_time() milliseconds.  The caller
464of this function does not own a reference to the returned pixbuf;
465the returned pixbuf will become invalid when the iterator advances
466to the next frame, which may happen anytime you call
467gdk_pixbuf_animation_iter_advance(). Copy the pixbuf to keep it
468(don't just add a reference), as it may get recycled as you advance
469the iterator.
470
471
472</description>
473<parameters>
474<parameter name="iter">
475<parameter_description> an animation iterator
476</parameter_description>
477</parameter>
478</parameters>
479<return> the pixbuf to be displayed
480</return>
481</function>
482
483<function name="gdk_pixbuf_from_pixdata">
484<description>
485Converts a #GdkPixdata to a #GdkPixbuf. If @copy_pixels is %TRUE or
486if the pixel data is run-length-encoded, the pixel data is copied into
487newly-allocated memory; otherwise it is reused.
488
489
490</description>
491<parameters>
492<parameter name="pixdata">
493<parameter_description> a #GdkPixdata to convert into a #GdkPixbuf.
494</parameter_description>
495</parameter>
496<parameter name="copy_pixels">
497<parameter_description> whether to copy raw pixel data; run-length encoded
498pixel data is always copied.
499</parameter_description>
500</parameter>
501<parameter name="error">
502<parameter_description> location to store possible errors.
503</parameter_description>
504</parameter>
505</parameters>
506<return> a new #GdkPixbuf.
507</return>
508</function>
509
510<function name="gdk_pixbuf_get_height">
511<description>
512Queries the height of a pixbuf.
513
514
515</description>
516<parameters>
517<parameter name="pixbuf">
518<parameter_description> A pixbuf.
519</parameter_description>
520</parameter>
521</parameters>
522<return> Height in pixels.
523</return>
524</function>
525
526<function name="gdk_pixbuf_simple_anim_add_frame">
527<description>
528Adds a new frame to @animation. The @pixbuf must
529have the dimensions specified when the animation
530was constructed.
531
532Since: 2.8
533
534</description>
535<parameters>
536<parameter name="animation">
537<parameter_description> a #GdkPixbufSimpleAnim
538</parameter_description>
539</parameter>
540<parameter name="pixbuf">
541<parameter_description> the pixbuf to add
542</parameter_description>
543</parameter>
544</parameters>
545<return></return>
546</function>
547
548<function name="gdk_pixbuf_animation_get_iter">
549<description>
550Get an iterator for displaying an animation. The iterator provides
551the frames that should be displayed at a given time.
552It should be freed after use with g_object_unref().
553
554@start_time would normally come from g_get_current_time(), and
555marks the beginning of animation playback. After creating an
556iterator, you should immediately display the pixbuf returned by
557gdk_pixbuf_animation_iter_get_pixbuf(). Then, you should install a
558timeout (with g_timeout_add()) or by some other mechanism ensure
559that you'll update the image after
560gdk_pixbuf_animation_iter_get_delay_time() milliseconds. Each time
561the image is updated, you should reinstall the timeout with the new,
562possibly-changed delay time.
563
564As a shortcut, if @start_time is %NULL, the result of
565g_get_current_time() will be used automatically.
566
567To update the image (i.e. possibly change the result of
568gdk_pixbuf_animation_iter_get_pixbuf() to a new frame of the animation),
569call gdk_pixbuf_animation_iter_advance().
570
571If you're using #GdkPixbufLoader, in addition to updating the image
572after the delay time, you should also update it whenever you
573receive the area_updated signal and
574gdk_pixbuf_animation_iter_on_currently_loading_frame() returns
575%TRUE. In this case, the frame currently being fed into the loader
576has received new data, so needs to be refreshed. The delay time for
577a frame may also be modified after an area_updated signal, for
578example if the delay time for a frame is encoded in the data after
579the frame itself. So your timeout should be reinstalled after any
580area_updated signal.
581
582A delay time of -1 is possible, indicating &quot;infinite.&quot;
583
584
585</description>
586<parameters>
587<parameter name="animation">
588<parameter_description> a #GdkPixbufAnimation
589</parameter_description>
590</parameter>
591<parameter name="start_time">
592<parameter_description> time when the animation starts playing
593</parameter_description>
594</parameter>
595</parameters>
596<return> an iterator to move over the animation
597</return>
598</function>
599
600<function name="gdk_pixbuf_get_formats">
601<description>
602Obtains the available information about the image formats supported
603by GdkPixbuf.
604
605Since: 2.2
606
607</description>
608<parameters>
609</parameters>
610<return> A list of #GdkPixbufFormat&lt;!-- --&gt;s describing the supported
611image formats.  The list should be freed when it is no longer needed,
612but the structures themselves are owned by #GdkPixbuf and should not be
613freed.
614
615</return>
616</function>
617
618<function name="gdk_pixdata_from_pixbuf">
619<description>
620Converts a #GdkPixbuf to a #GdkPixdata. If @use_rle is %TRUE, the
621pixel data is run-length encoded into newly-allocated memory and a
622pointer to that memory is returned.
623
624
625</description>
626<parameters>
627<parameter name="pixdata">
628<parameter_description> a #GdkPixdata to fill.
629</parameter_description>
630</parameter>
631<parameter name="pixbuf">
632<parameter_description> the data to fill @pixdata with.
633</parameter_description>
634</parameter>
635<parameter name="use_rle">
636<parameter_description> whether to use run-length encoding for the pixel data.
637</parameter_description>
638</parameter>
639</parameters>
640<return> If @ure_rle is %TRUE, a pointer to the newly-allocated memory
641for the run-length encoded pixel data, otherwise %NULL.
642</return>
643</function>
644
645<function name="gdk_pixbuf_simple_anim_new">
646<description>
647Creates a new, empty animation.
648
649Since: 2.8
650
651</description>
652<parameters>
653<parameter name="width">
654<parameter_description> the width of the animation
655</parameter_description>
656</parameter>
657<parameter name="height">
658<parameter_description> the height of the animation
659</parameter_description>
660</parameter>
661<parameter name="rate">
662<parameter_description> the speed of the animation, in frames per second
663</parameter_description>
664</parameter>
665</parameters>
666<return> a newly allocated #GdkPixbufSimpleAnim
667
668</return>
669</function>
670
671<function name="gdk_pixbuf_copy_area">
672<description>
673Copies a rectangular area from @src_pixbuf to @dest_pixbuf.  Conversion of
674pixbuf formats is done automatically.
675
676If the source rectangle overlaps the destination rectangle on the
677same pixbuf, it will be overwritten during the copy operation.
678Therefore, you can not use this function to scroll a pixbuf.
679
680</description>
681<parameters>
682<parameter name="src_pixbuf">
683<parameter_description> Source pixbuf.
684</parameter_description>
685</parameter>
686<parameter name="src_x">
687<parameter_description> Source X coordinate within @src_pixbuf.
688</parameter_description>
689</parameter>
690<parameter name="src_y">
691<parameter_description> Source Y coordinate within @src_pixbuf.
692</parameter_description>
693</parameter>
694<parameter name="width">
695<parameter_description> Width of the area to copy.
696</parameter_description>
697</parameter>
698<parameter name="height">
699<parameter_description> Height of the area to copy.
700</parameter_description>
701</parameter>
702<parameter name="dest_pixbuf">
703<parameter_description> Destination pixbuf.
704</parameter_description>
705</parameter>
706<parameter name="dest_x">
707<parameter_description> X coordinate within @dest_pixbuf.
708</parameter_description>
709</parameter>
710<parameter name="dest_y">
711<parameter_description> Y coordinate within @dest_pixbuf.
712</parameter_description>
713</parameter>
714</parameters>
715<return></return>
716</function>
717
718<function name="gdk_pixbuf_flip">
719<description>
720Flips a pixbuf horizontally or vertically and returns the
721result in a new pixbuf.
722
723Since: 2.6
724
725</description>
726<parameters>
727<parameter name="src">
728<parameter_description> a #GdkPixbuf
729</parameter_description>
730</parameter>
731<parameter name="horizontal">
732<parameter_description> %TRUE to flip horizontally, %FALSE to flip vertically
733</parameter_description>
734</parameter>
735</parameters>
736<return> the new #GdkPixbuf, or %NULL if not enough memory could be
737allocated for it.
738
739</return>
740</function>
741
742<function name="gdk_pixbuf_animation_iter_get_delay_time">
743<description>
744Gets the number of milliseconds the current pixbuf should be displayed,
745or -1 if the current pixbuf should be displayed forever. g_timeout_add()
746conveniently takes a timeout in milliseconds, so you can use a timeout
747to schedule the next update.
748
749
750</description>
751<parameters>
752<parameter name="iter">
753<parameter_description> an animation iterator
754</parameter_description>
755</parameter>
756</parameters>
757<return> delay time in milliseconds (thousandths of a second)
758</return>
759</function>
760
761<function name="gdk_pixbuf_animation_ref">
762<description>
763Adds a reference to an animation.
764
765Deprecated: 2.0: Use g_object_ref().
766
767</description>
768<parameters>
769<parameter name="animation">
770<parameter_description> An animation.
771</parameter_description>
772</parameter>
773</parameters>
774<return> The same as the @animation argument.
775
776</return>
777</function>
778
779<function name="gdk_pixbuf_save_to_callbackv">
780<description>
781Saves pixbuf to a callback in format @type, which is currently &quot;jpeg&quot;,
782&quot;png&quot;, &quot;tiff&quot;, &quot;ico&quot; or &quot;bmp&quot;.  If @error is set, %FALSE will be returned. See
783gdk_pixbuf_save_to_callback () for more details.
784
785Since: 2.4
786
787</description>
788<parameters>
789<parameter name="pixbuf">
790<parameter_description> a #GdkPixbuf.
791</parameter_description>
792</parameter>
793<parameter name="save_func">
794<parameter_description> a function that is called to save each block of data that
795the save routine generates.
796</parameter_description>
797</parameter>
798<parameter name="user_data">
799<parameter_description> user data to pass to the save function.
800</parameter_description>
801</parameter>
802<parameter name="type">
803<parameter_description> name of file format.
804</parameter_description>
805</parameter>
806<parameter name="option_keys">
807<parameter_description> name of options to set, %NULL-terminated
808</parameter_description>
809</parameter>
810<parameter name="option_values">
811<parameter_description> values for named options
812</parameter_description>
813</parameter>
814<parameter name="error">
815<parameter_description> return location for error, or %NULL
816</parameter_description>
817</parameter>
818</parameters>
819<return> whether an error was set
820
821</return>
822</function>
823
824<function name="gdk_pixbuf_get_has_alpha">
825<description>
826Queries whether a pixbuf has an alpha channel (opacity information).
827
828
829</description>
830<parameters>
831<parameter name="pixbuf">
832<parameter_description> A pixbuf.
833</parameter_description>
834</parameter>
835</parameters>
836<return> %TRUE if it has an alpha channel, %FALSE otherwise.
837</return>
838</function>
839
840<function name="gdk_pixbuf_simple_anim_get_loop">
841<description>
842Gets whether @animation should loop indefinitely when it reaches the end.
843
844Since: 2.18
845
846</description>
847<parameters>
848<parameter name="animation">
849<parameter_description> a #GdkPixbufSimpleAnim
850</parameter_description>
851</parameter>
852</parameters>
853<return> %TRUE if the animation loops forever, %FALSE otherwise
854
855</return>
856</function>
857
858<function name="gdk_pixbuf_apply_embedded_orientation">
859<description>
860Takes an existing pixbuf and checks for the presence of an
861associated &quot;orientation&quot; option, which may be provided by the
862jpeg loader (which reads the exif orientation tag) or the
863tiff loader (which reads the tiff orientation tag, and
864compensates it for the partial transforms performed by
865libtiff). If an orientation option/tag is present, the
866appropriate transform will be performed so that the pixbuf
867is oriented correctly.
868
869Since: 2.12
870
871</description>
872<parameters>
873<parameter name="src">
874<parameter_description> A #GdkPixbuf.
875</parameter_description>
876</parameter>
877</parameters>
878<return> A newly-created pixbuf, or a reference to the
879input pixbuf (with an increased reference count).
880
881</return>
882</function>
883
884<function name="gdk_pixbuf_new_from_xpm_data">
885<description>
886Creates a new pixbuf by parsing XPM data in memory.  This data is commonly
887the result of including an XPM file into a program's C source.
888
889
890</description>
891<parameters>
892<parameter name="data">
893<parameter_description> Pointer to inline XPM data.
894</parameter_description>
895</parameter>
896</parameters>
897<return> A newly-created pixbuf with a reference count of 1.
898</return>
899</function>
900
901<function name="gdk_pixbuf_format_get_license">
902<description>
903Returns information about the license of the image loader for the format. The
904returned string should be a shorthand for a wellknown license, e.g. &quot;LGPL&quot;,
905&quot;GPL&quot;, &quot;QPL&quot;, &quot;GPL/QPL&quot;, or &quot;other&quot; to indicate some other license.  This
906string should be freed with g_free() when it's no longer needed.
907
908Since: 2.6
909
910</description>
911<parameters>
912<parameter name="format">
913<parameter_description> a #GdkPixbufFormat
914</parameter_description>
915</parameter>
916</parameters>
917<return> a string describing the license of @format.
918
919</return>
920</function>
921
922<function name="gdk_pixbuf_savev">
923<description>
924Saves pixbuf to a file in @type, which is currently &quot;jpeg&quot;, &quot;png&quot;, &quot;tiff&quot;, &quot;ico&quot; or &quot;bmp&quot;.
925If @error is set, %FALSE will be returned.
926See gdk_pixbuf_save () for more details.
927
928
929</description>
930<parameters>
931<parameter name="pixbuf">
932<parameter_description> a #GdkPixbuf.
933</parameter_description>
934</parameter>
935<parameter name="filename">
936<parameter_description> name of file to save.
937</parameter_description>
938</parameter>
939<parameter name="type">
940<parameter_description> name of file format.
941</parameter_description>
942</parameter>
943<parameter name="option_keys">
944<parameter_description> name of options to set, %NULL-terminated
945</parameter_description>
946</parameter>
947<parameter name="option_values">
948<parameter_description> values for named options
949</parameter_description>
950</parameter>
951<parameter name="error">
952<parameter_description> return location for error, or %NULL
953</parameter_description>
954</parameter>
955</parameters>
956<return> whether an error was set
957</return>
958</function>
959
960<function name="gdk_pixbuf_add_alpha">
961<description>
962Takes an existing pixbuf and adds an alpha channel to it.
963If the existing pixbuf already had an alpha channel, the channel
964values are copied from the original; otherwise, the alpha channel
965is initialized to 255 (full opacity).
966
967If @substitute_color is %TRUE, then the color specified by (@r, @g, @b) will be
968assigned zero opacity. That is, if you pass (255, 255, 255) for the
969substitute color, all white pixels will become fully transparent.
970
971
972</description>
973<parameters>
974<parameter name="pixbuf">
975<parameter_description> A #GdkPixbuf.
976</parameter_description>
977</parameter>
978<parameter name="substitute_color">
979<parameter_description> Whether to set a color to zero opacity.  If this
980is %FALSE, then the (@r, @g, @b) arguments will be ignored.
981</parameter_description>
982</parameter>
983<parameter name="r">
984<parameter_description> Red value to substitute.
985</parameter_description>
986</parameter>
987<parameter name="g">
988<parameter_description> Green value to substitute.
989</parameter_description>
990</parameter>
991<parameter name="b">
992<parameter_description> Blue value to substitute.
993</parameter_description>
994</parameter>
995</parameters>
996<return> A newly-created pixbuf with a reference count of 1.
997</return>
998</function>
999
1000<function name="gdk_pixbuf_get_colorspace">
1001<description>
1002Queries the color space of a pixbuf.
1003
1004
1005</description>
1006<parameters>
1007<parameter name="pixbuf">
1008<parameter_description> A pixbuf.
1009</parameter_description>
1010</parameter>
1011</parameters>
1012<return> Color space.
1013</return>
1014</function>
1015
1016<function name="gdk_pixbuf_scale_simple">
1017<description>
1018Create a new #GdkPixbuf containing a copy of @src scaled to
1019@dest_width x @dest_height. Leaves @src unaffected.  @interp_type
1020should be #GDK_INTERP_NEAREST if you want maximum speed (but when
1021scaling down #GDK_INTERP_NEAREST is usually unusably ugly).  The
1022default @interp_type should be #GDK_INTERP_BILINEAR which offers
1023reasonable quality and speed.
1024
1025You can scale a sub-portion of @src by creating a sub-pixbuf
1026pointing into @src; see gdk_pixbuf_new_subpixbuf().
1027
1028For more complicated scaling/compositing see gdk_pixbuf_scale()
1029and gdk_pixbuf_composite().
1030
1031
1032</description>
1033<parameters>
1034<parameter name="src">
1035<parameter_description> a #GdkPixbuf
1036</parameter_description>
1037</parameter>
1038<parameter name="dest_width">
1039<parameter_description> the width of destination image
1040</parameter_description>
1041</parameter>
1042<parameter name="dest_height">
1043<parameter_description> the height of destination image
1044</parameter_description>
1045</parameter>
1046<parameter name="interp_type">
1047<parameter_description> the interpolation type for the transformation.
1048</parameter_description>
1049</parameter>
1050</parameters>
1051<return> the new #GdkPixbuf, or %NULL if not enough memory could be
1052allocated for it.
1053</return>
1054</function>
1055
1056<function name="gdk_pixbuf_save_to_bufferv">
1057<description>
1058Saves pixbuf to a new buffer in format @type, which is currently &quot;jpeg&quot;,
1059&quot;tiff&quot;, &quot;png&quot;, &quot;ico&quot; or &quot;bmp&quot;.  See gdk_pixbuf_save_to_buffer()
1060for more details.
1061
1062Since: 2.4
1063
1064</description>
1065<parameters>
1066<parameter name="pixbuf">
1067<parameter_description> a #GdkPixbuf.
1068</parameter_description>
1069</parameter>
1070<parameter name="buffer">
1071<parameter_description> location to receive a pointer to the new buffer.
1072</parameter_description>
1073</parameter>
1074<parameter name="buffer_size">
1075<parameter_description> location to receive the size of the new buffer.
1076</parameter_description>
1077</parameter>
1078<parameter name="type">
1079<parameter_description> name of file format.
1080</parameter_description>
1081</parameter>
1082<parameter name="option_keys">
1083<parameter_description> name of options to set, %NULL-terminated
1084</parameter_description>
1085</parameter>
1086<parameter name="option_values">
1087<parameter_description> values for named options
1088</parameter_description>
1089</parameter>
1090<parameter name="error">
1091<parameter_description> return location for error, or %NULL
1092</parameter_description>
1093</parameter>
1094</parameters>
1095<return> whether an error was set
1096
1097</return>
1098</function>
1099
1100<function name="gdk_pixbuf_save">
1101<description>
1102Saves pixbuf to a file in format @type. By default, &quot;jpeg&quot;, &quot;png&quot;, &quot;ico&quot;
1103and &quot;bmp&quot; are possible file formats to save in, but more formats may be
1104installed. The list of all writable formats can be determined in the
1105following way:
1106
1107|[
1108void add_if_writable (GdkPixbufFormat *data, GSList **list)
1109{
1110if (gdk_pixbuf_format_is_writable (data))
1111*list = g_slist_prepend (*list, data);
1112}
1113
1114GSList *formats = gdk_pixbuf_get_formats ();
1115GSList *writable_formats = NULL;
1116g_slist_foreach (formats, add_if_writable, &amp;writable_formats);
1117g_slist_free (formats);
1118]|
1119
1120If @error is set, %FALSE will be returned. Possible errors include
1121those in the #GDK_PIXBUF_ERROR domain and those in the #G_FILE_ERROR domain.
1122
1123The variable argument list should be %NULL-terminated; if not empty,
1124it should contain pairs of strings that modify the save
1125parameters. For example:
1126&lt;informalexample&gt;&lt;programlisting&gt;
1127gdk_pixbuf_save (pixbuf, handle, &quot;jpeg&quot;, &amp;error,
1128&quot;quality&quot;, &quot;100&quot;, NULL);
1129&lt;/programlisting&gt;&lt;/informalexample&gt;
1130
1131Currently only few parameters exist. JPEG images can be saved with a
1132&quot;quality&quot; parameter; its value should be in the range [0,100].
1133
1134Text chunks can be attached to PNG images by specifying parameters of
1135the form &quot;tEXt::key&quot;, where key is an ASCII string of length 1-79.
1136The values are UTF-8 encoded strings. The PNG compression level can
1137be specified using the &quot;compression&quot; parameter; it's value is in an
1138integer in the range of [0,9].
1139
1140ICC color profiles can also be embedded into PNG and TIFF images.
1141The &quot;icc-profile&quot; value should be the complete ICC profile encoded
1142into base64.
1143
1144&lt;informalexample&gt;&lt;programlisting&gt;
1145gchar *contents;
1146gchar *contents_encode;
1147gsize length;
1148g_file_get_contents (&quot;/home/hughsie/.color/icc/L225W.icm&quot;, &amp;contents, &amp;length, NULL);
1149contents_encode = g_base64_encode ((const guchar *) contents, length);
1150gdk_pixbuf_save (pixbuf, handle, &quot;png&quot;, &amp;error,
1151&quot;icc-profile&quot;, contents_encode,
1152NULL);
1153&lt;/programlisting&gt;&lt;/informalexample&gt;
1154
1155TIFF images recognize a &quot;compression&quot; option which acceps an integer value.
1156Among the codecs are 1 None, 2 Huffman, 5 LZW, 7 JPEG and 8 Deflate, see
1157the libtiff documentation and tiff.h for all supported codec values.
1158
1159ICO images can be saved in depth 16, 24, or 32, by using the &quot;depth&quot;
1160parameter. When the ICO saver is given &quot;x_hot&quot; and &quot;y_hot&quot; parameters,
1161it produces a CUR instead of an ICO.
1162
1163
1164</description>
1165<parameters>
1166<parameter name="pixbuf">
1167<parameter_description> a #GdkPixbuf.
1168</parameter_description>
1169</parameter>
1170<parameter name="filename">
1171<parameter_description> name of file to save.
1172</parameter_description>
1173</parameter>
1174<parameter name="type">
1175<parameter_description> name of file format.
1176</parameter_description>
1177</parameter>
1178<parameter name="error">
1179<parameter_description> return location for error, or %NULL
1180</parameter_description>
1181</parameter>
1182<parameter name="Varargs">
1183<parameter_description> list of key-value save options
1184</parameter_description>
1185</parameter>
1186</parameters>
1187<return> whether an error was set
1188</return>
1189</function>
1190
1191<function name="gdk_pixbuf_loader_close">
1192<description>
1193Informs a pixbuf loader that no further writes with
1194gdk_pixbuf_loader_write() will occur, so that it can free its
1195internal loading structures. Also, tries to parse any data that
1196hasn't yet been parsed; if the remaining data is partial or
1197corrupt, an error will be returned.  If %FALSE is returned, @error
1198will be set to an error from the #GDK_PIXBUF_ERROR or #G_FILE_ERROR
1199domains. If you're just cancelling a load rather than expecting it
1200to be finished, passing %NULL for @error to ignore it is
1201reasonable.
1202
1203Remember that this does not unref the loader, so if you plan not to
1204use it anymore, please g_object_unref() it.
1205
1206
1207</description>
1208<parameters>
1209<parameter name="loader">
1210<parameter_description> A pixbuf loader.
1211</parameter_description>
1212</parameter>
1213<parameter name="error">
1214<parameter_description> return location for a #GError, or %NULL to ignore errors
1215</parameter_description>
1216</parameter>
1217</parameters>
1218<return> %TRUE if all image data written so far was successfully
1219            passed out via the update_area signal
1220</return>
1221</function>
1222
1223<function name="gdk_pixbuf_fill">
1224<description>
1225Clears a pixbuf to the given RGBA value, converting the RGBA value into
1226the pixbuf's pixel format. The alpha will be ignored if the pixbuf
1227doesn't have an alpha channel.
1228
1229
1230</description>
1231<parameters>
1232<parameter name="pixbuf">
1233<parameter_description> a #GdkPixbuf
1234</parameter_description>
1235</parameter>
1236<parameter name="pixel">
1237<parameter_description> RGBA pixel to clear to
1238(0xffffffff is opaque white, 0x00000000 transparent black)
1239</parameter_description>
1240</parameter>
1241</parameters>
1242<return></return>
1243</function>
1244
1245<function name="gdk_pixbuf_new_from_file">
1246<description>
1247Creates a new pixbuf by loading an image from a file.  The file format is
1248detected automatically. If %NULL is returned, then @error will be set.
1249Possible errors are in the #GDK_PIXBUF_ERROR and #G_FILE_ERROR domains.
1250
1251
1252</description>
1253<parameters>
1254<parameter name="filename">
1255<parameter_description> Name of file to load, in the GLib file name encoding
1256</parameter_description>
1257</parameter>
1258<parameter name="error">
1259<parameter_description> Return location for an error
1260</parameter_description>
1261</parameter>
1262</parameters>
1263<return> A newly-created pixbuf with a reference count of 1, or %NULL if
1264any of several error conditions occurred:  the file could not be opened,
1265there was no loader for the file's format, there was not enough memory to
1266allocate the image buffer, or the image file contained invalid data.
1267</return>
1268</function>
1269
1270<function name="gdk_pixbuf_new_from_inline">
1271<description>
1272Create a #GdkPixbuf from a flat representation that is suitable for
1273storing as inline data in a program. This is useful if you want to
1274ship a program with images, but don't want to depend on any
1275external files.
1276
1277gdk-pixbuf ships with a program called &lt;command&gt;gdk-pixbuf-csource&lt;/command&gt;
1278which allows for conversion of #GdkPixbufs into such a inline representation.
1279In almost all cases, you should pass the &lt;option&gt;--raw&lt;/option&gt; flag to
1280&lt;command&gt;gdk-pixbuf-csource&lt;/command&gt;. A sample invocation would be:
1281
1282&lt;informalexample&gt;&lt;programlisting&gt;
1283gdk-pixbuf-csource --raw --name=myimage_inline myimage.png
1284&lt;/programlisting&gt;&lt;/informalexample&gt;
1285
1286For the typical case where the inline pixbuf is read-only static data,
1287you don't need to copy the pixel data unless you intend to write to
1288it, so you can pass %FALSE for @copy_pixels.  (If you pass
1289&lt;option&gt;--rle&lt;/option&gt; to &lt;command&gt;gdk-pixbuf-csource&lt;/command&gt;, a copy
1290will be made even if @copy_pixels is %FALSE, so using this option is
1291generally a bad idea.)
1292
1293If you create a pixbuf from const inline data compiled into your
1294program, it's probably safe to ignore errors and disable length checks,
1295since things will always succeed:
1296&lt;informalexample&gt;&lt;programlisting&gt;
1297pixbuf = gdk_pixbuf_new_from_inline (-1, myimage_inline, FALSE, NULL);
1298&lt;/programlisting&gt;&lt;/informalexample&gt;
1299
1300For non-const inline data, you could get out of memory. For untrusted
1301inline data located at runtime, you could have corrupt inline data in
1302addition.
1303
1304
1305</description>
1306<parameters>
1307<parameter name="data_length">
1308<parameter_description> Length in bytes of the @data argument or -1 to
1309disable length checks
1310</parameter_description>
1311</parameter>
1312<parameter name="data">
1313<parameter_description> Byte data containing a serialized #GdkPixdata structure
1314</parameter_description>
1315</parameter>
1316<parameter name="copy_pixels">
1317<parameter_description> Whether to copy the pixel data, or use direct pointers
1318@data for the resulting pixbuf
1319</parameter_description>
1320</parameter>
1321<parameter name="error">
1322<parameter_description> #GError return location, may be %NULL to ignore errors
1323</parameter_description>
1324</parameter>
1325</parameters>
1326<return> A newly-created #GdkPixbuf structure with a reference,
1327count of 1, or %NULL if an error occurred.
1328</return>
1329</function>
1330
1331<function name="gdk_pixbuf_new_from_file_at_size">
1332<description>
1333Creates a new pixbuf by loading an image from a file.
1334The file format is detected automatically. If %NULL is returned, then
1335@error will be set. Possible errors are in the #GDK_PIXBUF_ERROR and
1336#G_FILE_ERROR domains.
1337
1338The image will be scaled to fit in the requested size, preserving
1339the image's aspect ratio. Note that the returned pixbuf may be smaller
1340than @width x @height, if the aspect ratio requires it. To load
1341and image at the requested size, regardless of aspect ratio, use
1342gdk_pixbuf_new_from_file_at_scale().
1343
1344Since: 2.4
1345
1346</description>
1347<parameters>
1348<parameter name="filename">
1349<parameter_description> Name of file to load, in the GLib file name encoding
1350</parameter_description>
1351</parameter>
1352<parameter name="width">
1353<parameter_description> The width the image should have or -1 to not constrain the width
1354</parameter_description>
1355</parameter>
1356<parameter name="height">
1357<parameter_description> The height the image should have or -1 to not constrain the height
1358</parameter_description>
1359</parameter>
1360<parameter name="error">
1361<parameter_description> Return location for an error
1362</parameter_description>
1363</parameter>
1364</parameters>
1365<return> A newly-created pixbuf with a reference count of 1, or
1366%NULL if any of several error conditions occurred:  the file could not
1367be opened, there was no loader for the file's format, there was not
1368enough memory to allocate the image buffer, or the image file contained
1369invalid data.
1370
1371</return>
1372</function>
1373
1374<function name="gdk_pixbuf_copy">
1375<description>
1376Creates a new #GdkPixbuf with a copy of the information in the specified
1377@pixbuf.
1378
1379
1380</description>
1381<parameters>
1382<parameter name="pixbuf">
1383<parameter_description> A pixbuf.
1384</parameter_description>
1385</parameter>
1386</parameters>
1387<return> A newly-created pixbuf with a reference count of 1, or %NULL if
1388not enough memory could be allocated.
1389</return>
1390</function>
1391
1392<function name="gdk_pixbuf_composite">
1393<description>
1394Creates a transformation of the source image @src by scaling by
1395@scale_x and @scale_y then translating by @offset_x and @offset_y.
1396This gives an image in the coordinates of the destination pixbuf.
1397The rectangle (@dest_x, @dest_y, @dest_width, @dest_height)
1398is then composited onto the corresponding rectangle of the
1399original destination image.
1400
1401When the destination rectangle contains parts not in the source
1402image, the data at the edges of the source image is replicated
1403to infinity.
1404
1405&lt;figure id=&quot;pixbuf-composite-diagram&quot;&gt;
1406&lt;title&gt;Compositing of pixbufs&lt;/title&gt;
1407&lt;graphic fileref=&quot;composite.png&quot; format=&quot;PNG&quot;/&gt;
1408&lt;/figure&gt;
1409
1410</description>
1411<parameters>
1412<parameter name="src">
1413<parameter_description> a #GdkPixbuf
1414</parameter_description>
1415</parameter>
1416<parameter name="dest">
1417<parameter_description> the #GdkPixbuf into which to render the results
1418</parameter_description>
1419</parameter>
1420<parameter name="dest_x">
1421<parameter_description> the left coordinate for region to render
1422</parameter_description>
1423</parameter>
1424<parameter name="dest_y">
1425<parameter_description> the top coordinate for region to render
1426</parameter_description>
1427</parameter>
1428<parameter name="dest_width">
1429<parameter_description> the width of the region to render
1430</parameter_description>
1431</parameter>
1432<parameter name="dest_height">
1433<parameter_description> the height of the region to render
1434</parameter_description>
1435</parameter>
1436<parameter name="offset_x">
1437<parameter_description> the offset in the X direction (currently rounded to an integer)
1438</parameter_description>
1439</parameter>
1440<parameter name="offset_y">
1441<parameter_description> the offset in the Y direction (currently rounded to an integer)
1442</parameter_description>
1443</parameter>
1444<parameter name="scale_x">
1445<parameter_description> the scale factor in the X direction
1446</parameter_description>
1447</parameter>
1448<parameter name="scale_y">
1449<parameter_description> the scale factor in the Y direction
1450</parameter_description>
1451</parameter>
1452<parameter name="interp_type">
1453<parameter_description> the interpolation type for the transformation.
1454</parameter_description>
1455</parameter>
1456<parameter name="overall_alpha">
1457<parameter_description> overall alpha for source image (0..255)
1458</parameter_description>
1459</parameter>
1460</parameters>
1461<return></return>
1462</function>
1463
1464<function name="gdk_pixbuf_format_get_mime_types">
1465<description>
1466Returns the mime types supported by the format.
1467
1468Since: 2.2
1469
1470</description>
1471<parameters>
1472<parameter name="format">
1473<parameter_description> a #GdkPixbufFormat
1474</parameter_description>
1475</parameter>
1476</parameters>
1477<return> a %NULL-terminated array of mime types which must be freed with
1478g_strfreev() when it is no longer needed.
1479
1480</return>
1481</function>
1482
1483<function name="gdk_pixbuf_unref">
1484<description>
1485Removes a reference from a pixbuf.
1486
1487Deprecated: 2.0: Use g_object_unref().
1488
1489</description>
1490<parameters>
1491<parameter name="pixbuf">
1492<parameter_description> A pixbuf.
1493</parameter_description>
1494</parameter>
1495</parameters>
1496<return></return>
1497</function>
1498
1499<function name="gdk_pixbuf_loader_set_size">
1500<description>
1501Causes the image to be scaled while it is loaded. The desired
1502image size can be determined relative to the original size of
1503the image by calling gdk_pixbuf_loader_set_size() from a
1504signal handler for the ::size-prepared signal.
1505
1506Attempts to set the desired image size  are ignored after the
1507emission of the ::size-prepared signal.
1508
1509Since: 2.2
1510
1511</description>
1512<parameters>
1513<parameter name="loader">
1514<parameter_description> A pixbuf loader.
1515</parameter_description>
1516</parameter>
1517<parameter name="width">
1518<parameter_description> The desired width of the image being loaded.
1519</parameter_description>
1520</parameter>
1521<parameter name="height">
1522<parameter_description> The desired height of the image being loaded.
1523</parameter_description>
1524</parameter>
1525</parameters>
1526<return></return>
1527</function>
1528
1529<function name="gdk_pixbuf_simple_anim_set_loop">
1530<description>
1531Sets whether @animation should loop indefinitely when it reaches the end.
1532
1533Since: 2.18
1534
1535</description>
1536<parameters>
1537<parameter name="animation">
1538<parameter_description> a #GdkPixbufSimpleAnim
1539</parameter_description>
1540</parameter>
1541<parameter name="loop">
1542<parameter_description> whether to loop the animation
1543</parameter_description>
1544</parameter>
1545</parameters>
1546<return></return>
1547</function>
1548
1549<function name="gdk_pixbuf_save_to_callback">
1550<description>
1551Saves pixbuf in format @type by feeding the produced data to a
1552callback. Can be used when you want to store the image to something
1553other than a file, such as an in-memory buffer or a socket.
1554If @error is set, %FALSE will be returned. Possible errors
1555include those in the #GDK_PIXBUF_ERROR domain and whatever the save
1556function generates.
1557
1558See gdk_pixbuf_save() for more details.
1559
1560Since: 2.4
1561
1562</description>
1563<parameters>
1564<parameter name="pixbuf">
1565<parameter_description> a #GdkPixbuf.
1566</parameter_description>
1567</parameter>
1568<parameter name="save_func">
1569<parameter_description> a function that is called to save each block of data that
1570the save routine generates.
1571</parameter_description>
1572</parameter>
1573<parameter name="user_data">
1574<parameter_description> user data to pass to the save function.
1575</parameter_description>
1576</parameter>
1577<parameter name="type">
1578<parameter_description> name of file format.
1579</parameter_description>
1580</parameter>
1581<parameter name="error">
1582<parameter_description> return location for error, or %NULL
1583</parameter_description>
1584</parameter>
1585<parameter name="Varargs">
1586<parameter_description> list of key-value save options
1587</parameter_description>
1588</parameter>
1589</parameters>
1590<return> whether an error was set
1591
1592</return>
1593</function>
1594
1595<function name="gdk_pixbuf_format_is_scalable">
1596<description>
1597Returns whether this image format is scalable. If a file is in a
1598scalable format, it is preferable to load it at the desired size,
1599rather than loading it at the default size and scaling the
1600resulting pixbuf to the desired size.
1601
1602Since: 2.6
1603
1604</description>
1605<parameters>
1606<parameter name="format">
1607<parameter_description> a #GdkPixbufFormat
1608</parameter_description>
1609</parameter>
1610</parameters>
1611<return> whether this image format is scalable.
1612
1613</return>
1614</function>
1615
1616<function name="gdk_pixbuf_loader_new_with_type">
1617<description>
1618Creates a new pixbuf loader object that always attempts to parse
1619image data as if it were an image of type @image_type, instead of
1620identifying the type automatically. Useful if you want an error if
1621the image isn't the expected type, for loading image formats
1622that can't be reliably identified by looking at the data, or if
1623the user manually forces a specific type.
1624
1625The list of supported image formats depends on what image loaders
1626are installed, but typically &quot;png&quot;, &quot;jpeg&quot;, &quot;gif&quot;, &quot;tiff&quot; and
1627&quot;xpm&quot; are among the supported formats. To obtain the full list of
1628supported image formats, call gdk_pixbuf_format_get_name() on each
1629of the #GdkPixbufFormat structs returned by gdk_pixbuf_get_formats().
1630
1631
1632</description>
1633<parameters>
1634<parameter name="image_type">
1635<parameter_description> name of the image format to be loaded with the image
1636</parameter_description>
1637</parameter>
1638<parameter name="error">
1639<parameter_description> return location for an allocated #GError, or %NULL to ignore errors
1640</parameter_description>
1641</parameter>
1642</parameters>
1643<return> A newly-created pixbuf loader.
1644</return>
1645</function>
1646
1647<function name="gdk_pixbuf_loader_get_animation">
1648<description>
1649Queries the #GdkPixbufAnimation that a pixbuf loader is currently creating.
1650In general it only makes sense to call this function after the &quot;area-prepared&quot;
1651signal has been emitted by the loader. If the loader doesn't have enough
1652bytes yet (hasn't emitted the &quot;area-prepared&quot; signal) this function will
1653return %NULL.
1654
1655
1656</description>
1657<parameters>
1658<parameter name="loader">
1659<parameter_description> A pixbuf loader
1660</parameter_description>
1661</parameter>
1662</parameters>
1663<return> The #GdkPixbufAnimation that the loader is loading, or %NULL if
1664 not enough data has been read to determine the information.
1665</return>
1666</function>
1667
1668<function name="gdk_pixbuf_animation_get_static_image">
1669<description>
1670If an animation is really just a plain image (has only one frame),
1671this function returns that image. If the animation is an animation,
1672this function returns a reasonable thing to display as a static
1673unanimated image, which might be the first frame, or something more
1674sophisticated. If an animation hasn't loaded any frames yet, this
1675function will return %NULL.
1676
1677
1678</description>
1679<parameters>
1680<parameter name="animation">
1681<parameter_description> a #GdkPixbufAnimation
1682</parameter_description>
1683</parameter>
1684</parameters>
1685<return> unanimated image representing the animation
1686</return>
1687</function>
1688
1689<function name="gdk_pixbuf_get_bits_per_sample">
1690<description>
1691Queries the number of bits per color sample in a pixbuf.
1692
1693
1694</description>
1695<parameters>
1696<parameter name="pixbuf">
1697<parameter_description> A pixbuf.
1698</parameter_description>
1699</parameter>
1700</parameters>
1701<return> Number of bits per color sample.
1702</return>
1703</function>
1704
1705<function name="gdk_pixbuf_loader_get_pixbuf">
1706<description>
1707Queries the #GdkPixbuf that a pixbuf loader is currently creating.
1708In general it only makes sense to call this function after the
1709&quot;area-prepared&quot; signal has been emitted by the loader; this means
1710that enough data has been read to know the size of the image that
1711will be allocated.  If the loader has not received enough data via
1712gdk_pixbuf_loader_write(), then this function returns %NULL.  The
1713returned pixbuf will be the same in all future calls to the loader,
1714so simply calling g_object_ref() should be sufficient to continue
1715using it.  Additionally, if the loader is an animation, it will
1716return the &quot;static image&quot; of the animation
1717(see gdk_pixbuf_animation_get_static_image()).
1718
1719
1720</description>
1721<parameters>
1722<parameter name="loader">
1723<parameter_description> A pixbuf loader.
1724</parameter_description>
1725</parameter>
1726</parameters>
1727<return> The #GdkPixbuf that the loader is creating, or %NULL if not
1728enough data has been read to determine how to create the image buffer.
1729</return>
1730</function>
1731
1732<function name="gdk_pixbuf_format_get_description">
1733<description>
1734Returns a description of the format.
1735
1736Since: 2.2
1737
1738</description>
1739<parameters>
1740<parameter name="format">
1741<parameter_description> a #GdkPixbufFormat
1742</parameter_description>
1743</parameter>
1744</parameters>
1745<return> a description of the format.
1746
1747</return>
1748</function>
1749
1750<function name="gdk_pixbuf_new_subpixbuf">
1751<description>
1752Creates a new pixbuf which represents a sub-region of
1753@src_pixbuf. The new pixbuf shares its pixels with the
1754original pixbuf, so writing to one affects both.
1755The new pixbuf holds a reference to @src_pixbuf, so
1756@src_pixbuf will not be finalized until the new pixbuf
1757is finalized.
1758
1759
1760</description>
1761<parameters>
1762<parameter name="src_pixbuf">
1763<parameter_description> a #GdkPixbuf
1764</parameter_description>
1765</parameter>
1766<parameter name="src_x">
1767<parameter_description> X coord in @src_pixbuf
1768</parameter_description>
1769</parameter>
1770<parameter name="src_y">
1771<parameter_description> Y coord in @src_pixbuf
1772</parameter_description>
1773</parameter>
1774<parameter name="width">
1775<parameter_description> width of region in @src_pixbuf
1776</parameter_description>
1777</parameter>
1778<parameter name="height">
1779<parameter_description> height of region in @src_pixbuf
1780</parameter_description>
1781</parameter>
1782</parameters>
1783<return> a new pixbuf
1784</return>
1785</function>
1786
1787<function name="gdk_pixbuf_scale">
1788<description>
1789Creates a transformation of the source image @src by scaling by
1790@scale_x and @scale_y then translating by @offset_x and @offset_y,
1791then renders the rectangle (@dest_x, @dest_y, @dest_width,
1792@dest_height) of the resulting image onto the destination image
1793replacing the previous contents.
1794
1795Try to use gdk_pixbuf_scale_simple() first, this function is
1796the industrial-strength power tool you can fall back to if
1797gdk_pixbuf_scale_simple() isn't powerful enough.
1798
1799If the source rectangle overlaps the destination rectangle on the
1800same pixbuf, it will be overwritten during the scaling which
1801results in rendering artifacts.
1802
1803</description>
1804<parameters>
1805<parameter name="src">
1806<parameter_description> a #GdkPixbuf
1807</parameter_description>
1808</parameter>
1809<parameter name="dest">
1810<parameter_description> the #GdkPixbuf into which to render the results
1811</parameter_description>
1812</parameter>
1813<parameter name="dest_x">
1814<parameter_description> the left coordinate for region to render
1815</parameter_description>
1816</parameter>
1817<parameter name="dest_y">
1818<parameter_description> the top coordinate for region to render
1819</parameter_description>
1820</parameter>
1821<parameter name="dest_width">
1822<parameter_description> the width of the region to render
1823</parameter_description>
1824</parameter>
1825<parameter name="dest_height">
1826<parameter_description> the height of the region to render
1827</parameter_description>
1828</parameter>
1829<parameter name="offset_x">
1830<parameter_description> the offset in the X direction (currently rounded to an integer)
1831</parameter_description>
1832</parameter>
1833<parameter name="offset_y">
1834<parameter_description> the offset in the Y direction (currently rounded to an integer)
1835</parameter_description>
1836</parameter>
1837<parameter name="scale_x">
1838<parameter_description> the scale factor in the X direction
1839</parameter_description>
1840</parameter>
1841<parameter name="scale_y">
1842<parameter_description> the scale factor in the Y direction
1843</parameter_description>
1844</parameter>
1845<parameter name="interp_type">
1846<parameter_description> the interpolation type for the transformation.
1847</parameter_description>
1848</parameter>
1849</parameters>
1850<return></return>
1851</function>
1852
1853<function name="gdk_pixbuf_animation_unref">
1854<description>
1855Removes a reference from an animation.
1856
1857Deprecated: 2.0: Use g_object_unref().
1858
1859</description>
1860<parameters>
1861<parameter name="animation">
1862<parameter_description> An animation.
1863</parameter_description>
1864</parameter>
1865</parameters>
1866<return></return>
1867</function>
1868
1869<function name="gdk_pixbuf_get_option">
1870<description>
1871Looks up @key in the list of options that may have been attached to the
1872@pixbuf when it was loaded, or that may have been attached by another
1873function using gdk_pixbuf_set_option().
1874
1875For instance, the ANI loader provides &quot;Title&quot; and &quot;Artist&quot; options.
1876The ICO, XBM, and XPM loaders provide &quot;x_hot&quot; and &quot;y_hot&quot; hot-spot
1877options for cursor definitions. The PNG loader provides the tEXt ancillary
1878chunk key/value pairs as options. Since 2.12, the TIFF and JPEG loaders
1879return an &quot;orientation&quot; option string that corresponds to the embedded
1880TIFF/Exif orientation tag (if present).
1881
1882
1883</description>
1884<parameters>
1885<parameter name="pixbuf">
1886<parameter_description> a #GdkPixbuf
1887</parameter_description>
1888</parameter>
1889<parameter name="key">
1890<parameter_description> a nul-terminated string.
1891</parameter_description>
1892</parameter>
1893</parameters>
1894<return> the value associated with @key. This is a nul-terminated
1895string that should not be freed or %NULL if @key was not found.
1896</return>
1897</function>
1898
1899<function name="gdk_pixbuf_composite_color">
1900<description>
1901Creates a transformation of the source image @src by scaling by
1902@scale_x and @scale_y then translating by @offset_x and @offset_y,
1903then composites the rectangle (@dest_x ,@dest_y, @dest_width,
1904@dest_height) of the resulting image with a checkboard of the
1905colors @color1 and @color2 and renders it onto the destination
1906image.
1907
1908See gdk_pixbuf_composite_color_simple() for a simpler variant of this
1909function suitable for many tasks.
1910
1911
1912</description>
1913<parameters>
1914<parameter name="src">
1915<parameter_description> a #GdkPixbuf
1916</parameter_description>
1917</parameter>
1918<parameter name="dest">
1919<parameter_description> the #GdkPixbuf into which to render the results
1920</parameter_description>
1921</parameter>
1922<parameter name="dest_x">
1923<parameter_description> the left coordinate for region to render
1924</parameter_description>
1925</parameter>
1926<parameter name="dest_y">
1927<parameter_description> the top coordinate for region to render
1928</parameter_description>
1929</parameter>
1930<parameter name="dest_width">
1931<parameter_description> the width of the region to render
1932</parameter_description>
1933</parameter>
1934<parameter name="dest_height">
1935<parameter_description> the height of the region to render
1936</parameter_description>
1937</parameter>
1938<parameter name="offset_x">
1939<parameter_description> the offset in the X direction (currently rounded to an integer)
1940</parameter_description>
1941</parameter>
1942<parameter name="offset_y">
1943<parameter_description> the offset in the Y direction (currently rounded to an integer)
1944</parameter_description>
1945</parameter>
1946<parameter name="scale_x">
1947<parameter_description> the scale factor in the X direction
1948</parameter_description>
1949</parameter>
1950<parameter name="scale_y">
1951<parameter_description> the scale factor in the Y direction
1952</parameter_description>
1953</parameter>
1954<parameter name="interp_type">
1955<parameter_description> the interpolation type for the transformation.
1956</parameter_description>
1957</parameter>
1958<parameter name="overall_alpha">
1959<parameter_description> overall alpha for source image (0..255)
1960</parameter_description>
1961</parameter>
1962<parameter name="check_x">
1963<parameter_description> the X offset for the checkboard (origin of checkboard is at -@check_x, -@check_y)
1964</parameter_description>
1965</parameter>
1966<parameter name="check_y">
1967<parameter_description> the Y offset for the checkboard
1968</parameter_description>
1969</parameter>
1970<parameter name="check_size">
1971<parameter_description> the size of checks in the checkboard (must be a power of two)
1972</parameter_description>
1973</parameter>
1974<parameter name="color1">
1975<parameter_description> the color of check at upper left
1976</parameter_description>
1977</parameter>
1978<parameter name="color2">
1979<parameter_description> the color of the other check
1980</parameter_description>
1981</parameter>
1982</parameters>
1983<return></return>
1984</function>
1985
1986<function name="gdk_pixdata_to_csource">
1987<description>
1988Generates C source code suitable for compiling images directly
1989into programs.
1990
1991gdk-pixbuf ships with a program called &lt;command&gt;gdk-pixbuf-csource&lt;/command&gt;
1992which offers a command line interface to this function.
1993
1994
1995</description>
1996<parameters>
1997<parameter name="pixdata">
1998<parameter_description> a #GdkPixdata to convert to C source.
1999</parameter_description>
2000</parameter>
2001<parameter name="name">
2002<parameter_description> used for naming generated data structures or macros.
2003</parameter_description>
2004</parameter>
2005<parameter name="dump_type">
2006<parameter_description> a #GdkPixdataDumpType determining the kind of C
2007source to be generated.
2008</parameter_description>
2009</parameter>
2010</parameters>
2011<return> a newly-allocated string containing the C source form
2012of @pixdata.
2013</return>
2014</function>
2015
2016<function name="gdk_pixbuf_animation_iter_on_currently_loading_frame">
2017<description>
2018Used to determine how to respond to the area_updated signal on
2019#GdkPixbufLoader when loading an animation. area_updated is emitted
2020for an area of the frame currently streaming in to the loader. So if
2021you're on the currently loading frame, you need to redraw the screen for
2022the updated area.
2023
2024
2025</description>
2026<parameters>
2027<parameter name="iter">
2028<parameter_description> a #GdkPixbufAnimationIter
2029</parameter_description>
2030</parameter>
2031</parameters>
2032<return> %TRUE if the frame we're on is partially loaded, or the last frame
2033</return>
2034</function>
2035
2036<function name="gdk_pixbuf_new_from_file_at_scale">
2037<description>
2038Creates a new pixbuf by loading an image from a file.  The file format is
2039detected automatically. If %NULL is returned, then @error will be set.
2040Possible errors are in the #GDK_PIXBUF_ERROR and #G_FILE_ERROR domains.
2041The image will be scaled to fit in the requested size, optionally preserving
2042the image's aspect ratio.
2043
2044When preserving the aspect ratio, a @width of -1 will cause the image
2045to be scaled to the exact given height, and a @height of -1 will cause
2046the image to be scaled to the exact given width. When not preserving
2047aspect ratio, a @width or @height of -1 means to not scale the image
2048at all in that dimension. Negative values for @width and @height are
2049allowed since 2.8.
2050
2051Since: 2.6
2052
2053</description>
2054<parameters>
2055<parameter name="filename">
2056<parameter_description> Name of file to load, in the GLib file name encoding
2057</parameter_description>
2058</parameter>
2059<parameter name="width">
2060<parameter_description> The width the image should have or -1 to not constrain the width
2061</parameter_description>
2062</parameter>
2063<parameter name="height">
2064<parameter_description> The height the image should have or -1 to not constrain the height
2065</parameter_description>
2066</parameter>
2067<parameter name="preserve_aspect_ratio">
2068<parameter_description> %TRUE to preserve the image's aspect ratio
2069</parameter_description>
2070</parameter>
2071<parameter name="error">
2072<parameter_description> Return location for an error
2073</parameter_description>
2074</parameter>
2075</parameters>
2076<return> A newly-created pixbuf with a reference count of 1, or %NULL
2077if any of several error conditions occurred:  the file could not be opened,
2078there was no loader for the file's format, there was not enough memory to
2079allocate the image buffer, or the image file contained invalid data.
2080
2081</return>
2082</function>
2083
2084<function name="gdk_pixbuf_get_width">
2085<description>
2086Queries the width of a pixbuf.
2087
2088
2089</description>
2090<parameters>
2091<parameter name="pixbuf">
2092<parameter_description> A pixbuf.
2093</parameter_description>
2094</parameter>
2095</parameters>
2096<return> Width in pixels.
2097</return>
2098</function>
2099
2100<function name="gdk_pixbuf_loader_new">
2101<description>
2102Creates a new pixbuf loader object.
2103
2104
2105</description>
2106<parameters>
2107</parameters>
2108<return> A newly-created pixbuf loader.
2109</return>
2110</function>
2111
2112<function name="gdk_pixbuf_animation_is_static_image">
2113<description>
2114If you load a file with gdk_pixbuf_animation_new_from_file() and it turns
2115out to be a plain, unanimated image, then this function will return
2116%TRUE. Use gdk_pixbuf_animation_get_static_image() to retrieve
2117the image.
2118
2119
2120</description>
2121<parameters>
2122<parameter name="animation">
2123<parameter_description> a #GdkPixbufAnimation
2124</parameter_description>
2125</parameter>
2126</parameters>
2127<return> %TRUE if the &quot;animation&quot; was really just an image
2128</return>
2129</function>
2130
2131<function name="gdk_pixbuf_format_get_name">
2132<description>
2133Returns the name of the format.
2134
2135Since: 2.2
2136
2137</description>
2138<parameters>
2139<parameter name="format">
2140<parameter_description> a #GdkPixbufFormat
2141</parameter_description>
2142</parameter>
2143</parameters>
2144<return> the name of the format.
2145
2146</return>
2147</function>
2148
2149<function name="gdk_pixbuf_format_get_extensions">
2150<description>
2151Returns the filename extensions typically used for files in the
2152given format.
2153
2154Since: 2.2
2155
2156</description>
2157<parameters>
2158<parameter name="format">
2159<parameter_description> a #GdkPixbufFormat
2160</parameter_description>
2161</parameter>
2162</parameters>
2163<return> a %NULL-terminated array of filename extensions which must be
2164freed with g_strfreev() when it is no longer needed.
2165
2166</return>
2167</function>
2168
2169<function name="gdk_pixbuf_animation_new_from_file">
2170<description>
2171Creates a new animation by loading it from a file.  The file format is
2172detected automatically.  If the file's format does not support multi-frame
2173images, then an animation with a single frame will be created. Possible errors
2174are in the #GDK_PIXBUF_ERROR and #G_FILE_ERROR domains.
2175
2176
2177</description>
2178<parameters>
2179<parameter name="filename">
2180<parameter_description> Name of file to load, in the GLib file name encoding
2181</parameter_description>
2182</parameter>
2183<parameter name="error">
2184<parameter_description> return location for error
2185</parameter_description>
2186</parameter>
2187</parameters>
2188<return> A newly-created animation with a reference count of 1, or %NULL
2189if any of several error conditions ocurred:  the file could not be opened,
2190there was no loader for the file's format, there was not enough memory to
2191allocate the image buffer, or the image file contained invalid data.
2192</return>
2193</function>
2194
2195<function name="gdk_pixbuf_new_from_stream">
2196<description>
2197Creates a new pixbuf by loading an image from an input stream.
2198
2199The file format is detected automatically. If %NULL is returned, then
2200@error will be set. The @cancellable can be used to abort the operation
2201from another thread. If the operation was cancelled, the error
2202%GIO_ERROR_CANCELLED will be returned. Other possible errors are in
2203the #GDK_PIXBUF_ERROR and %G_IO_ERROR domains.
2204
2205The stream is not closed.
2206
2207Since: 2.14
2208
2209</description>
2210<parameters>
2211<parameter name="stream">
2212<parameter_description>  a #GInputStream to load the pixbuf from
2213</parameter_description>
2214</parameter>
2215<parameter name="cancellable">
2216<parameter_description> optional #GCancellable object, %NULL to ignore
2217</parameter_description>
2218</parameter>
2219<parameter name="error">
2220<parameter_description> Return location for an error
2221</parameter_description>
2222</parameter>
2223</parameters>
2224<return> A newly-created pixbuf, or %NULL if any of several error
2225conditions occurred: the file could not be opened, the image format is
2226not supported, there was not enough memory to allocate the image buffer,
2227the stream contained invalid data, or the operation was cancelled.
2228
2229</return>
2230</function>
2231
2232<function name="gdk_pixbuf_composite_color_simple">
2233<description>
2234Creates a new #GdkPixbuf by scaling @src to @dest_width x
2235@dest_height and compositing the result with a checkboard of colors
2236@color1 and @color2.
2237
2238
2239</description>
2240<parameters>
2241<parameter name="src">
2242<parameter_description> a #GdkPixbuf
2243</parameter_description>
2244</parameter>
2245<parameter name="dest_width">
2246<parameter_description> the width of destination image
2247</parameter_description>
2248</parameter>
2249<parameter name="dest_height">
2250<parameter_description> the height of destination image
2251</parameter_description>
2252</parameter>
2253<parameter name="interp_type">
2254<parameter_description> the interpolation type for the transformation.
2255</parameter_description>
2256</parameter>
2257<parameter name="overall_alpha">
2258<parameter_description> overall alpha for source image (0..255)
2259</parameter_description>
2260</parameter>
2261<parameter name="check_size">
2262<parameter_description> the size of checks in the checkboard (must be a power of two)
2263</parameter_description>
2264</parameter>
2265<parameter name="color1">
2266<parameter_description> the color of check at upper left
2267</parameter_description>
2268</parameter>
2269<parameter name="color2">
2270<parameter_description> the color of the other check
2271</parameter_description>
2272</parameter>
2273</parameters>
2274<return> the new #GdkPixbuf, or %NULL if not enough memory could be
2275allocated for it.
2276</return>
2277</function>
2278
2279<function name="gdk_pixdata_deserialize">
2280<description>
2281Deserializes (reconstruct) a #GdkPixdata structure from a byte stream.
2282The byte stream consists of a straightforward writeout of the
2283#GdkPixdata fields in network byte order, plus the @pixel_data
2284bytes the structure points to.
2285The @pixdata contents are reconstructed byte by byte and are checked
2286for validity. This function may fail with %GDK_PIXBUF_CORRUPT_IMAGE
2287or %GDK_PIXBUF_ERROR_UNKNOWN_TYPE.
2288
2289
2290</description>
2291<parameters>
2292<parameter name="pixdata">
2293<parameter_description> a #GdkPixdata structure to be filled in.
2294</parameter_description>
2295</parameter>
2296<parameter name="stream_length">
2297<parameter_description> length of the stream used for deserialization.
2298</parameter_description>
2299</parameter>
2300<parameter name="stream">
2301<parameter_description> stream of bytes containing a serialized #GdkPixdata structure.
2302</parameter_description>
2303</parameter>
2304<parameter name="error">
2305<parameter_description> #GError location to indicate failures (maybe %NULL to ignore errors).
2306</parameter_description>
2307</parameter>
2308</parameters>
2309<return> Upon successful deserialization %TRUE is returned,
2310%FALSE otherwise.
2311</return>
2312</function>
2313
2314<function name="gdk_pixbuf_saturate_and_pixelate">
2315<description>
2316Modifies saturation and optionally pixelates @src, placing the result in
2317@dest. @src and @dest may be the same pixbuf with no ill effects.  If
2318@saturation is 1.0 then saturation is not changed. If it's less than 1.0,
2319saturation is reduced (the image turns toward grayscale); if greater than
23201.0, saturation is increased (the image gets more vivid colors). If @pixelate
2321is %TRUE, then pixels are faded in a checkerboard pattern to create a
2322pixelated image. @src and @dest must have the same image format, size, and
2323rowstride.
2324
2325
2326</description>
2327<parameters>
2328<parameter name="src">
2329<parameter_description> source image
2330</parameter_description>
2331</parameter>
2332<parameter name="dest">
2333<parameter_description> place to write modified version of @src
2334</parameter_description>
2335</parameter>
2336<parameter name="saturation">
2337<parameter_description> saturation factor
2338</parameter_description>
2339</parameter>
2340<parameter name="pixelate">
2341<parameter_description> whether to pixelate
2342</parameter_description>
2343</parameter>
2344</parameters>
2345<return></return>
2346</function>
2347
2348<function name="gdk_pixdata_serialize">
2349<description>
2350Serializes a #GdkPixdata structure into a byte stream.
2351The byte stream consists of a straightforward writeout of the
2352#GdkPixdata fields in network byte order, plus the @pixel_data
2353bytes the structure points to.
2354
2355
2356</description>
2357<parameters>
2358<parameter name="pixdata">
2359<parameter_description> a valid #GdkPixdata structure to serialize.
2360</parameter_description>
2361</parameter>
2362<parameter name="stream_length_p">
2363<parameter_description> location to store the resulting stream length in.
2364</parameter_description>
2365</parameter>
2366</parameters>
2367<return> A newly-allocated string containing the serialized
2368#GdkPixdata structure.
2369</return>
2370</function>
2371
2372<function name="gdk_pixbuf_format_copy">
2373<description>
2374Creates a copy of @format
2375
2376Since: 2.22
2377
2378</description>
2379<parameters>
2380<parameter name="format">
2381<parameter_description> a #GdkPixbufFormat
2382</parameter_description>
2383</parameter>
2384</parameters>
2385<return> the newly allocated copy of a #GdkPixbufFormat. Use
2386gdk_pixbuf_format_free() to free the resources when done
2387
2388</return>
2389</function>
2390
2391<function name="gdk_pixbuf_set_option">
2392<description>
2393Attaches a key/value pair as an option to a #GdkPixbuf. If %key already
2394exists in the list of options attached to @pixbuf, the new value is
2395ignored and %FALSE is returned.
2396
2397Since: 2.2
2398
2399</description>
2400<parameters>
2401<parameter name="pixbuf">
2402<parameter_description> a #GdkPixbuf
2403</parameter_description>
2404</parameter>
2405<parameter name="key">
2406<parameter_description> a nul-terminated string.
2407</parameter_description>
2408</parameter>
2409<parameter name="value">
2410<parameter_description> a nul-terminated string.
2411</parameter_description>
2412</parameter>
2413</parameters>
2414<return> %TRUE on success.
2415
2416</return>
2417</function>
2418
2419<function name="gdk_pixbuf_format_free">
2420<description>
2421Frees the resources allocated when copying a #GdkPixbufFormat
2422using gdk_pixbuf_format_copy()
2423
2424Since: 2.22
2425
2426</description>
2427<parameters>
2428<parameter name="format">
2429<parameter_description> a #GdkPixbufFormat
2430</parameter_description>
2431</parameter>
2432</parameters>
2433<return></return>
2434</function>
2435
2436<function name="gdk_pixbuf_ref">
2437<description>
2438Adds a reference to a pixbuf.
2439
2440Deprecated: 2.0: Use g_object_ref().
2441
2442</description>
2443<parameters>
2444<parameter name="pixbuf">
2445<parameter_description> A pixbuf.
2446</parameter_description>
2447</parameter>
2448</parameters>
2449<return> The same as the @pixbuf argument.
2450
2451</return>
2452</function>
2453
2454<function name="gdk_pixbuf_new">
2455<description>
2456Creates a new #GdkPixbuf structure and allocates a buffer for it.  The
2457buffer has an optimal rowstride.  Note that the buffer is not cleared;
2458you will have to fill it completely yourself.
2459
2460
2461</description>
2462<parameters>
2463<parameter name="colorspace">
2464<parameter_description> Color space for image
2465</parameter_description>
2466</parameter>
2467<parameter name="has_alpha">
2468<parameter_description> Whether the image should have transparency information
2469</parameter_description>
2470</parameter>
2471<parameter name="bits_per_sample">
2472<parameter_description> Number of bits per color sample
2473</parameter_description>
2474</parameter>
2475<parameter name="width">
2476<parameter_description> Width of image in pixels, must be &gt; 0
2477</parameter_description>
2478</parameter>
2479<parameter name="height">
2480<parameter_description> Height of image in pixels, must be &gt; 0
2481</parameter_description>
2482</parameter>
2483</parameters>
2484<return> A newly-created #GdkPixbuf with a reference count of 1, or
2485%NULL if not enough memory could be allocated for the image buffer.
2486</return>
2487</function>
2488
2489<function name="gdk_pixbuf_animation_iter_advance">
2490<description>
2491Possibly advances an animation to a new frame. Chooses the frame based
2492on the start time passed to gdk_pixbuf_animation_get_iter().
2493
2494@current_time would normally come from g_get_current_time(), and
2495must be greater than or equal to the time passed to
2496gdk_pixbuf_animation_get_iter(), and must increase or remain
2497unchanged each time gdk_pixbuf_animation_iter_get_pixbuf() is
2498called. That is, you can't go backward in time; animations only
2499play forward.
2500
2501As a shortcut, pass %NULL for the current time and g_get_current_time()
2502will be invoked on your behalf. So you only need to explicitly pass
2503@current_time if you're doing something odd like playing the animation
2504at double speed.
2505
2506If this function returns %FALSE, there's no need to update the animation
2507display, assuming the display had been rendered prior to advancing;
2508if %TRUE, you need to call gdk_animation_iter_get_pixbuf() and update the
2509display with the new pixbuf.
2510
2511
2512</description>
2513<parameters>
2514<parameter name="iter">
2515<parameter_description> a #GdkPixbufAnimationIter
2516</parameter_description>
2517</parameter>
2518<parameter name="current_time">
2519<parameter_description> current time
2520</parameter_description>
2521</parameter>
2522</parameters>
2523<return> %TRUE if the image may need updating
2524
2525</return>
2526</function>
2527
2528<function name="gdk_pixbuf_get_file_info">
2529<description>
2530Parses an image file far enough to determine its format and size.
2531
2532Since: 2.4
2533
2534</description>
2535<parameters>
2536<parameter name="filename">
2537<parameter_description> The name of the file to identify.
2538</parameter_description>
2539</parameter>
2540<parameter name="width">
2541<parameter_description> Return location for the width of the image, or %NULL
2542</parameter_description>
2543</parameter>
2544<parameter name="height">
2545<parameter_description> Return location for the height of the image, or %NULL
2546</parameter_description>
2547</parameter>
2548</parameters>
2549<return> A #GdkPixbufFormat describing the image format of the file
2550or %NULL if the image format wasn't recognized. The return value
2551is owned by GdkPixbuf and should not be freed.
2552
2553</return>
2554</function>
2555
2556</root>
2557