summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/gdk-pixbuf-loader.c
Commit message (Collapse)AuthorAgeFilesLines
* Bug 561186 – GdkPixbuf API type checking needs cleanupChristian Dywan2008-11-301-5/+0
| | | | | | | | | | | | | | | | | | | 2008-11-30 Christian Dywan <christian@imendio.com> Bug 561186 – GdkPixbuf API type checking needs cleanup * gdk-pixbuf-loader.c (gdk_pixbuf_loader_write), (gdk_pixbuf_loader_get_pixbuf), (gdk_pixbuf_loader_get_animation), (gdk_pixbuf_loader_close), (gdk_pixbuf_loader_get_format): * gdk-pixbuf-scale.c (gdk_pixbuf_scale), (gdk_pixbuf_composite), (gdk_pixbuf_composite_color), (gdk_pixbuf_scale_simple), (gdk_pixbuf_composite_color_simple): * gdk-pixbuf-simple-anim.c (gdk_pixbuf_simple_anim_add_frame): * gdk-pixbuf-util.c (gdk_pixbuf_add_alpha), (gdk_pixbuf_apply_embedded_orientation): Improve type checking in pixbuf API svn path=/trunk/; revision=21832
* Bug 517233 – Calling gdk_pixbuf_loader_close causes "GError set over theMatthias Clasen2008-09-071-2/+6
| | | | | | | | | | | | | 2008-09-06 Matthias Clasen <mclasen@redhat.com> Bug 517233 – Calling gdk_pixbuf_loader_close causes "GError set over the top of a previous GError" warning * gdk-pixbuf-loader.c (gdk_pixbuf_loader_close): Don't overwrite errors. Reported by Andrey Tsyvarev svn path=/trunk/; revision=21309
* Fix a deadlock in pixbuf loader initializationMatthias Clasen2008-09-051-3/+2
| | | | svn path=/trunk/; revision=21295
* use canonical signal names.Sven Neumann2008-08-111-8/+8
| | | | | | | | | 2008-08-11 Sven Neumann <sven@gimp.org> * gdk-pixbuf/gdk-pixbuf-loader.c: use canonical signal names. svn path=/trunk/; revision=21072
* Include "config.h" instead of <config.h> Command used: find -nameJohan Dahlin2008-06-221-1/+1
| | | | | | | | | | | | 2008-06-21 Johan Dahlin <jdahlin@async.com.br> * *.[ch]: Include "config.h" instead of <config.h> Command used: find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g' Rubberstamped by Mitch and Tim svn path=/trunk/; revision=20669
* cast the return value of _gdk_pixbuf_scaled_anim_new() to fix incompatibleMichael Natterer2008-01-141-2/+2
| | | | | | | | | | | 2008-01-14 Michael Natterer <mitch@imendio.com> * gdk-pixbuf-loader.c (gdk_pixbuf_loader_prepare): cast the return value of _gdk_pixbuf_scaled_anim_new() to fix incompatible pointer warning. svn path=/trunk/; revision=19364
* Try again to make gdk_pixbuf_get_file_info work for tiff imagesMatthias Clasen2007-07-051-2/+6
| | | | svn path=/trunk/; revision=18384
* Be more careful when calling g_propagate_error(). (#453365, MichaelMatthias Clasen2007-07-031-1/+1
| | | | | | | | | | | | 2007-07-03 Matthias Clasen <mclasen@redhat.com> * gdk-pixbuf-loader.c (gdk_pixbuf_loader_close): Be more careful when calling g_propagate_error(). (#453365, Michael Chudobiak) svn path=/trunk/; revision=18357
* Implement scaling for animationsMatthias Clasen2007-03-081-15/+11
| | | | svn path=/trunk/; revision=17430
* Protect against stop_load begin broken. (#403255, Lucas Mazzardo Veloso)Matthias Clasen2007-02-061-1/+3
| | | | | | | | | | | 2007-02-06 Matthias Clasen <mclasen@redhat.com> * gdk-pixbuf-loader.c (gdk_pixbuf_loader_close): Protect against stop_load begin broken. (#403255, Lucas Mazzardo Veloso) svn path=/trunk/; revision=17267
* Fix memory leaks in error pathsMatthias Clasen2007-01-171-10/+1
| | | | svn path=/trunk/; revision=17165
* Emit the closed signal when closing the loader, pointed out by DavidMatthias Clasen2006-12-221-0/+2
| | | | | | | | 2006-12-21 Matthias Clasen <mclasen@redhat.com> * gdk-pixbuf-loader.c (gdk_pixbuf_loader_write): Emit the closed signal when closing the loader, pointed out by David Necas.
* Don't spew a warning if the printer is already closed.Matthias Clasen2006-12-191-2/+2
| | | | | | | 2006-12-19 Matthias Clasen <mclasen@redhat.com> * gdk-pixbuf-loader.c (gdk_pixbuf_loader_close): Don't spew a warning if the printer is already closed.
* Behave as documented and close the loader when returning FALSE.Matthias Clasen2006-12-101-11/+17
| | | | | | | 2006-12-09 Matthias Clasen <mclasen@redhat.com> * gdk-pixbuf-loader.c (gdk_pixbuf_loader_write): Behave as documented and close the loader when returning FALSE.
* Put the code to protect against broken loaders that forget to set error inMatthias Clasen2006-07-171-32/+32
| | | | | | | | | | | 2006-07-16 Matthias Clasen <mclasen@redhat.com> * gdk-pixbuf-loader.c (gdk_pixbuf_loader_load_module) (gdk_pixbuf_loader_write, gdk_pixbuf_loader_close) (gdk_pixbuf_loader_ensure_error): Put the code to protect against broken loaders that forget to set error in an auxiliary function and call it in more places. (#346428, Catmur)
* More of the sameMatthias Clasen2006-05-141-1/+1
|
* Use G_DEFINE_TYPEMatthias Clasen2006-04-041-43/+3
|
* Remove a pointless check, pointed out by Kjartan Maraas.FEDERICO_FILENAME_ENTRY_BRANCHPOINTMatthias Clasen2006-03-241-1/+0
| | | | | | | 2006-03-24 Matthias Clasen <mclasen@redhat.com> * gdk-pixbuf-loader.c (gdk_pixbuf_loader_write): Remove a pointless check, pointed out by Kjartan Maraas.
* Add some documentation about supported image formats, and how to find outMatthias Clasen2006-03-221-0/+13
| | | | | | | | 2006-03-22 Matthias Clasen <mclasen@redhat.com> * gdk-pixbuf-loader.c: Add some documentation about supported image formats, and how to find out about them. (#335536, Murray Cumming)
* Only call gdk_pixbuf_loader_eat_header_write() when count > 0. (#318589,Matthias Clasen2005-10-121-2/+4
| | | | | | | | 2005-10-12 Matthias Clasen <mclasen@redhat.com> * gdk-pixbuf-loader.c (gdk_pixbuf_loader_write): Only call gdk_pixbuf_loader_eat_header_write() when count > 0. (#318589, Bogdan Nicula)
* Use a 1k buffer for sniffing image formats, instead of 128 or 256 bytes.Matthias Clasen2005-10-031-1/+1
| | | | | | | | | | 2005-10-03 Matthias Clasen <mclasen@redhat.com> * gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file): * gdk-pixbuf-io.c (gdk_pixbuf_new_from_file): * gdk-pixbuf-loader.c: Use a 1k buffer for sniffing image formats, instead of 128 or 256 bytes. (#317225, Sebastien Bacher, Dom Lachowicz)
* Intern type names before registering the type to avoid unnecessary copies.Matthias Clasen2005-08-311-1/+1
| | | | | | | | | | | | | | 2005-08-31 Matthias Clasen <mclasen@redhat.com> * io-ani-animation.c (gdk_pixbuf_ani_anim_iter_get_type) (gdk_pixbuf_ani_anim_get_type): * io-gif-animation.c (gdk_pixbuf_gif_anim_get_type) (gdk_pixbuf_gif_anim_iter_get_type): * gdk-pixbuf-loader.c (gdk_pixbuf_loader_get_type): * gdk-pixbuf.c (gdk_pixbuf_get_type): * gdk-pixbuf-animation.c (gdk_pixbuf_animation_get_type): Intern type names before registering the type to avoid unnecessary copies.
* Make PLT-reduction work with gcc4, and don't include everything inMatthias Clasen2005-03-141-2/+3
| | | | | | | | | | | | | | | | | 2005-03-14 Matthias Clasen <mclasen@redhat.com> Make PLT-reduction work with gcc4, and don't include everything in gdk-pixbuf-alias.h: * gdk-pixbuf.symbols: Group symbols by header and source file. * /makegdkpixbufalias.pl: Protect definitions by the same preprocessor symbols used to guard the headers. Move the alias declarations to a separate file which is produced when calling makegdkpixbufalias.pl -def * Makefile.am (gdk-pixbuf-aliasdef.c): Add a rule to generate this file. * *.c: Include gdk-pixbuf-alias.h after the other headers, include gdk-pixbuf-aliasdef.c at the bottom.
* Close the loader before unreffing it in the error case. (#164915, CrispinMatthias Clasen2005-01-231-1/+3
| | | | | | | | | 2005-01-22 Matthias Clasen <mclasen@redhat.com> * gdk-pixbuf-loader.c (gdk_pixbuf_loader_new_with_type) (gdk_pixbuf_loader_new_with_mime_type): Close the loader before unreffing it in the error case. (#164915, Crispin Flowerday)
* Be extra careful when locking and handle the case that the module mayMatthias Clasen2004-11-161-4/+2
| | | | | | | | | | | | 2004-11-15 Matthias Clasen <mclasen@redhat.com> * gdk-pixbuf-animation.c: * gdk-pixbuf-loader.c: * gdk-pixbuf-io.c: Be extra careful when locking and handle the case that the module may initialize the thread system. * gdk-pixbuf-io.[hc] (_gdk_pixbuf_lock): Return whether the lock was actually taken.
* Changes to make gdk-pixbuf threadsafe (#157310, #157306, Colin Walters):Matthias Clasen2004-11-121-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-11-12 Matthias Clasen <mclasen@redhat.com> Changes to make gdk-pixbuf threadsafe (#157310, #157306, Colin Walters): * gdk-pixbuf-io.h (enum GdkPixbufFormatFlags): Add GDK_PIXBUF_FORMAT_THREADSAFE to indicate that an image loader is threadsafe. * gdk-pixbuf-io.c (get_file_formats, _gdk_pixbuf_load_module): Use a lock to make initialization of global data structures threadsafe. * gdk-pixbuf-private.h: * gdk-pixbuf-io.c (_gdk_pixbuf_lock, _gdk_pixbuf_unlock): Auxiliary functions which use another lock to protect threadunsafe image loaders. * gdk-pixbuf-io.c (gdk_pixbuf_real_save): (save_to_callback_with_tmp_file): (gdk_pixbuf_real_save_to_callback): (gdk_pixbuf_new_from_xpm_data): (_gdk_pixbuf_generic_image_load): * gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file): * gdk-pixbuf-loader.c (gdk_pixbuf_loader_load_module): (gdk_pixbuf_loader_close): (gdk_pixbuf_loader_finalize): Use _gdk_pixbuf_lock() and _gdk_pixbuf_unlock(). * io-ani.c, io-bmp.c, io-gif.c, io-ico.c: * io-jpeg.c, io-pcx.c, io-png.c, io-pnm.c: * io-ras.c, io-tga.c, io-wbmp.c, io-xbm.c: * io-xpm.c: Mark as threadsafe. * io-tiff.c: Remove pointless locking, mark as threadunsafe.
* 2.5.2GTK_2_5_2Matthias Clasen2004-08-251-4/+4
|
* Use the correct index, and compare correctly, reported by TommiMatthias Clasen2004-08-241-1/+1
| | | | | | | 2004-08-24 Matthias Clasen <mclasen@redhat.com> * gdk-pixbuf-loader.c (gdk_pixbuf_loader_new_with_mime_type): Use the correct index, and compare correctly, reported by Tommi Komulainen.
* Use the correct index, reported by Tommi Komulainen.Matthias Clasen2004-08-241-1/+1
| | | | | | | 2004-08-24 Matthias Clasen <mclasen@redhat.com> * gdk-pixbuf-loader.c (gdk_pixbuf_loader_new_with_mime_type): Use the correct index, reported by Tommi Komulainen.
* Add hidden aliases for exported symbols which are used internally in orderMatthias Clasen2004-08-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Tue Aug 10 23:53:59 2004 Matthias Clasen <maclas@gmx.de> Add hidden aliases for exported symbols which are used internally in order to get rid of many PLT entries. (#145519, Arjan van de Ven) * gdk/Makefile.am: Add rules to generate gdk_pixbuf.def and gdk-pixbuf-alias.h from gdk-pixbuf.symbols, and make make check check the abi with abicheck.sh. * gdk/gdk-pixbuf.symbols: New file. Definition of the gdk-pixbuf ABI. The file can be processed by cpp to filter out certain subsets of symbols. * gdk/abicheck.sh: New file. Script to check the actually symbols exported from libgdk_pibuf.2.0.so against the symbols found in gdk-pixbuf.symbols. * gdk/makegdkpixbufalias.pl: New file. Perl script to generate the header containing the alias definitions for internally used exported symbols from a list of symbols. * *.c: Include gdk-pixbuf-alias.h
* Fixes #136082 and #135265, patch by Morten Welinder.Federico Mena Quintero2004-03-061-0/+1
| | | | | | | | | | 2004-03-05 Federico Mena Quintero <federico@ximian.com> Fixes #136082 and #135265, patch by Morten Welinder. * configure.in: Use AC_SYS_LARGEFILE. * */*.c: #include <config.h>
* New public API to save pixbufs to non-file locations. (#82203, Tim Evans)Matthias Clasen2004-01-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Wed Jan 7 02:41:14 2004 Matthias Clasen <maclas@gmx.de> * gdk-pixbuf-io.c (gdk_pixbuf_save_to_bufferv): * gdk-pixbuf-io.c (gdk_pixbuf_save_to_buffer): * gdk-pixbuf-io.c (gdk_pixbuf_save_to_callbackv): * gdk-pixbuf-io.c (gdk_pixbuf_save_to_callback): New public API to save pixbufs to non-file locations. (#82203, Tim Evans) * gdk-pixbuf.h: * gdk_pixbuf.def: Declare the new public API. * gdk-pixbuf-io.h: Add save_to_callback to the module interface. * io-jpeg.c: * io-png.c: Implement save_to_callback. * gdk-pixbuf-io.c (gdk_pixbuf_savev): * gdk-pixbuf-io.c (gdk_pixbuf_save): Update documentation. * gdk-pixbuf-io.c (gdk_pixbuf_real_save): Support saving via image_module->save_to_callback. * gdk-pixbuf-io.c (gdk_pixbuf_real_save_to_callback): New generic save_to_callback function which falls back to image_module->save on a temp file.
* Make it possible to call gdk_pixbuf_loader_set_size (loader, 0, 0) byMatthias Clasen2004-01-071-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Wed Jan 7 01:17:36 2004 Matthias Clasen <maclas@gmx.de> * gdk-pixbuf-loader.c (gdk_pixbuf_loader_size_func): * gdk-pixbuf-loader.c (gdk_pixbuf_loader_set_size): * gdk-pixbuf-loader.c (gdk_pixbuf_loader_init): Make it possible to call gdk_pixbuf_loader_set_size (loader, 0, 0) by changing the initial values of priv->width/height to -1. * io-tiff.c (tiff_image_parse): * io-ras.c (RAS2State): * io-pnm.c (gdk_pixbuf__pnm_image_load_increment): * io-pcx.c (gdk_pixbuf__pcx_load_increment): * io-jpeg.c (gdk_pixbuf__jpeg_image_load_increment): * io-png.c (png_info_callback): * io-ico.c (DecodeHeader): * io-bmp.c (DecodeHeader): Call size_func once the size is known, even if the module can't make use of the scaling information. If size_func returns 0, don't allocate a pixbuf and return, if necessary with an error. * gdk-pixbuf.h: * gdk-pixbuf-io.c (gdk_pixbuf_get_file_info): A new function to determine the type and size of an image file without loading it completely. (#53725)
* Move the documentation for signals inline, to get proper parameterMatthias Clasen2003-12-111-2/+45
| | | | | | | | Thu Dec 11 01:57:05 2003 Matthias Clasen <maclas@gmx.de> * gdk-pixbuf-loader.c (gdk_pixbuf_loader_class_init): Move the documentation for signals inline, to get proper parameter documentation. (#128977)
* Add gdk_pixbuf_loader_new_with_mime_type.Matthias Clasen2003-06-221-0/+59
| | | | | | 2003-06-22 Matthias Clasen <matthias@localhost.localdomain> * gdk-pixbuf/gdk-pixbuf-sections.txt: Add gdk_pixbuf_loader_new_with_mime_type.
* Add sanity checks for GError handling. (#108345)Matthias Clasen2003-04-241-1/+4
|
* Document 2.2 API additions.Matthias Clasen2002-11-281-0/+4
|
* ReindentMatthias Clasen2002-11-051-358/+364
|
* Fix leaked pixbuf reference (#96823, Morten Welinder)Owen Taylor2002-11-051-0/+1
| | | | | | | Tue Nov 5 14:16:17 2002 Owen Taylor <otaylor@redhat.com> * gdk-pixbuf-loader.c (gdk_pixbuf_loader_close): Fix leaked pixbuf reference (#96823, Morten Welinder)
* Documentation updates.Matthias Clasen2002-10-111-1/+0
|
* Support for separately installed loaders. (#77486)Matthias Clasen2002-10-031-1/+27
| | | | | | | | | | | | | | | | | * Makefile.am gdk-pixbuf-animation.c gdk-pixbuf-data.c gdk-pixbuf-io.c gdk-pixbuf-io.h gdk-pixbuf-loader.c gdk-pixbuf-loader.h gdk-pixbuf-private.h gdk-pixbuf.h gdk-pixdata.c io-ani-animation.h io-ani.c io-bmp.c io-gif-animation.c io-gif-animation.h io-gif.c io-ico.c io-jpeg.c io-png.c io-pnm.c io-ras.c io-tga.c io-tiff.c io-wbmp.c io-xbm.c io-xpm.c pixbufloader_ani.def pixbufloader_bmp.def pixbufloader_gif.def pixbufloader_ico.def pixbufloader_jpeg.def pixbufloader_png.def pixbufloader_pnm.def pixbufloader_ras.def pixbufloader_tga.def pixbufloader_tiff.def pixbufloader_wbmp.def pixbufloader_xbm.def pixbufloader_xpm.def test-gdk-pixbuf.c gdk-pixbuf-animation.h queryloaders.c: Support for separately installed loaders. (#77486)
* Remove the _-prefix from gdk_pixbuf_set_option andMatthias Clasen2002-09-191-2/+2
| | | | gdk_pixbuf_non_anim_new again.
* _-prefix gdk_pixbuf_non_anim_new and gdk_pixbuf_set_option. Adjust allMatthias Clasen2002-09-171-2/+2
| | | | | | | * io-xpm.c, io-xbm.c, io-ico.c, io-ani.c, io-png.c, gdk-pixbuf.c, gdk-pixbuf-animation.c, gdk-pixbuf-loader.c, gdk-pixbuf-private.h: _-prefix gdk_pixbuf_non_anim_new and gdk_pixbuf_set_option. Adjust all callers.
* Load-at-size functionality for gdk-pixbuf.Matthias Clasen2002-07-061-20/+121
|
* Use priv->image_module->module_name instead of image_type which may beMatthias Clasen2002-04-091-1/+1
| | | | | | * gdk-pixbuf-loader.c (gdk_pixbuf_loader_load_module): Use priv->image_module->module_name instead of image_type which may be NULL.
* Fix a doc typo.Matthias Clasen2002-04-031-1/+1
| | | | * gdk-pixbuf-loader.c (gdk_pixbuf_loader_get_type): Fix a doc typo.
* Don't leak pixbuf on error.Matthias Clasen2002-03-251-2/+4
| | | | | | | | | | * io-tiff.c (tiff_image_parse): Don't leak pixbuf on error. * io-gif.c (gdk_pixbuf__gif_image_load_increment): Don't leak context->buf on error. * gdk-pixbuf-loader.c (gdk_pixbuf_loader_close): Make sure to call stop_load even for short images to prevent memleaks.
* remove C++-commented debug spew, reported by David L. CooperHavoc Pennington2002-02-221-1/+0
| | | | | | | 2002-02-21 Havoc Pennington <hp@pobox.com> * gdk-pixbuf-loader.c (gdk_pixbuf_loader_load_module): remove C++-commented debug spew, reported by David L. Cooper
* Add a (#ifdef 0'ed) test provoking a segfault in TIFFReadDirectory().Matthias Clasen2002-02-121-1/+2
| | | | | | | | | | | | | | | | | * test-images.h (tiff1_test_3), test-loaders.c (main): Add a (#ifdef 0'ed) test provoking a segfault in TIFFReadDirectory(). * io-ico.c (DecodeHeader): Check that pixbuf could be allocated. * test-images.h (ico_test_2), test-loaders.c (main): Test the previous change. * io-wbmp.c (gdk_pixbuf__wbmp_image_load_increment): Don't write beyond the end of buffer if width % 8 != 0. * io-tga.c (try_preload): Enforce that ctx->hdr->type is one of the supported types, otherwise parse_data_for_row () will not make any progress, leading to an infinite loop.
* More precise documentation about underscores and mnemonics. (#66380)Matthias Clasen2001-12-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gtk/gtklabel.c (gtk_label_new_with_mnemonic), gtk/gtkbutton.c (gtk_button_new_with_mnemonic): More precise documentation about underscores and mnemonics. (#66380) * gtk/gtktextiter.c (gtk_text_iter_backward_word_starts): Fix cyclic reference in docs. * gtk/gtklabel.c (gtk_label_set_justify): Correct documentation of default value. (#65402) * gtk/gtkmain.c (gtk_set_locale, gtk_disable_set_locale): Markup fixes. * gdk-pixbuf-io.c, gdk-pixbuf-animation.c, gdk-pixbuf-data.c, gdk-pixbuf-loader.c, gdk-pixbuf-scale.c, gdk-pixbuf-util.c, gdk-pixdata.c: Markup fixes. * gtk/text_widget.sgml: More precise wording. (#63388) * gtk/tmpl/gtksignal.sgml (GTK_SIGNAL_OFFSET): Add docs. * gtk/resources.sgml: Fix markup of mail URLs. * gtk/tmpl/gtkpaned.sgml, gtk/tmpl/gtkobject.sgml: Markup fixes. * gtk/tmpl/gtktoolbar.sgml (gtk_toolbar_{prepend,append}_element): Expand documentation. (#60471) * gtk/tmpl/gtkmain.sgml: Remove misleading information about gtk_set_locale(). (#65758)