1. 29 Mar, 2005 1 commit
  2. 12 Nov, 2004 1 commit
    • Matthias Clasen's avatar
      Changes to make gdk-pixbuf threadsafe (#157310, #157306, Colin Walters): · cb918cdb
      Matthias Clasen authored
      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.
      cb918cdb
  3. 08 Jul, 2004 1 commit
    • Matthias Clasen's avatar
      New functions to disable/enable individual loaders and to obtain license · 2c08beaf
      Matthias Clasen authored
      Wed Jul  7 23:53:58 2004  Matthias Clasen  <maclas@gmx.de>
      
      	* gdk-pixbuf-io.h:
      	* gdk-pixbuf-io.c (gdk_pixbuf_format_is_disabled):
      	* gdk-pixbuf-io.c (gdk_pixbuf_format_set_disabled):
      	* gdk-pixbuf-io.c (gdk_pixbuf_format_get_license):
      	New functions to disable/enable individual loaders and to
      	obtain license information about loaders.
      
      	* gdk-pixbuf-io.h (GdkPixbufFormat): Add disabled and
      	license fields.
      
      	* gdk-pixbuf-io.c (_gdk_pixbuf_get_module):
      	* gdk-pixbuf-io.c (_gdk_pixbuf_get_named_module): Skip
      	disabled loaders.
      
      	* io-*.c: Add license information in the fill_info
      	functions.
      2c08beaf
  4. 12 Jun, 2004 1 commit
  5. 06 Mar, 2004 1 commit
  6. 07 Jan, 2004 1 commit
    • Matthias Clasen's avatar
      Make it possible to call gdk_pixbuf_loader_set_size (loader, 0, 0) by · 5b26e695
      Matthias Clasen authored
      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)
      5b26e695
  7. 19 Sep, 2003 1 commit
  8. 18 Feb, 2003 1 commit
    • Matthias Clasen's avatar
      Auxiliary functions used to implement support for arbitrary origins. · 588a0dd2
      Matthias Clasen authored
      2003-02-18  Matthias Clasen  <maclas@gmx.de>
      
      	* io-tga.c (pixbuf_flip_row):
      	(pixbuf_flip_vertically): Auxiliary functions used to implement
      	support for arbitrary origins.
      	(parse_data_for_row_pseudocolor):
      	(parse_data_for_row_truecolor):
      	(parse_data_for_row_grayscale):
      	(parse_data_for_row):
      	(fill_in_context): Remove the check for upper-left origin.
      	(parse_rle_data): Support arbitrary origins. (#105912)
      
      	* io-tga.c (fread_check):
      	(fseek_check):
      	(get_header_from_file):
      	(get_colormap_from_file):
      	(get_image_pseudocolor):
      	(swap_channels_pixbuf):
      	(get_image_truecolor):
      	(get_image_grayscale):
      	(gdk_pixbuf__tga_load): Remove the non-incremental load
      	implementation, since we have generic_image_load () now.
      
      	(gdk_pixbuf__tga_stop_load): Fix a potential crash discovered by
      	pixbuf-lowmem.
      588a0dd2
  9. 13 Feb, 2003 1 commit
  10. 03 Oct, 2002 1 commit
    • Matthias Clasen's avatar
      Support for separately installed loaders. (#77486) · 45f7541f
      Matthias Clasen authored
      	* 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)
      45f7541f
  11. 03 Sep, 2002 1 commit
    • Matthias Clasen's avatar
      Don't leak memory if g_try_realloc fails. · 8abdfd3d
      Matthias Clasen authored
      	* io-tga.c (io_buffer_append):
      	* io-ico.c (DecodeHeader):
      	* io-bmp.c (grow_buffer): Don't leak memory if g_try_realloc fails.
      
      	* gdk-pixbuf-io.c (pixbuf_check_ico): Fix loading of .CUR files.
      	(#91826)
      8abdfd3d
  12. 06 Jul, 2002 1 commit
  13. 11 Apr, 2002 1 commit
    • Matthias Clasen's avatar
      More fixes for #77807: · 69395108
      Matthias Clasen authored
      	* io-tga.c (get_contiguous_pixbuf): Helper function to create
      	a pixbuf with a contiguous pixel array while being careful about
      	overflow.
      
      	* io-tga.c (fill_in_context, get_image_pseudocolor,
      	get_image_truecolor, get_image_grayscale): Use
      	get_contiguous_pixbuf instead of manually allocating image
      	storage.
      
      	* io-xpm.c (pixbuf_create_from_xpm):
      	* io-pnm.c (gdk_pixbuf__pnm_image_load):
      	* io-jpeg.c (gdk_pixbuf__jpeg_image_load): Use gdk_pixbuf_new
      	instead of manually allocating image storage.
      69395108
  14. 21 Mar, 2002 1 commit
  15. 18 Mar, 2002 1 commit
  16. 12 Feb, 2002 1 commit
    • Matthias Clasen's avatar
      Add a (#ifdef 0'ed) test provoking a segfault in TIFFReadDirectory(). · a9a06ee4
      Matthias Clasen authored
      	* 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.
      a9a06ee4
  17. 10 Feb, 2002 1 commit
    • Matthias Clasen's avatar
      Enable some tests which should work now. · 73aa2bfe
      Matthias Clasen authored
      	* test-loaders.c (main): Enable some tests which should work
      	now.
      
      	* io-wbmp.c (gdk_pixbuf__wbmp_image_load_increment): Detect
      	invalid image dimensions and insufficient memory.
      
      	* io-tga.c (try_preload): Detect invalid image dimensions.
      	(gdk_pixbuf__tga_stop_load): Don't try to unref NULL pointers.
      
      	* io-ico.c (DecodeHeader): Detect some invalid headers and
      	don't segfault.
      73aa2bfe
  18. 13 Dec, 2001 1 commit
    • Sebastian Wilhelmi's avatar
      Remove assorted G_OBJECT casts where unnecessary. · d99bd97f
      Sebastian Wilhelmi authored
      
      2001-12-13  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
      
      	* gdk-pixbuf-animation.c, gdk-pixbuf-loader.c, gdk-pixpuf.c,
      	io-gif-animation.c, io-gif.c, io-tiff.c, test-loaders.c: Remove
      	assorted G_OBJECT casts where unnecessary.
      
      	* gdk-pixbuf-loader.c: Call g_object_ref and g_object_unref
      	instead of gdk_pixbuf_animation_ref and gdk_pixbuf_animation_unref
      	resp.
      
      	* gdk-pixbuf-csource.c, io-bmp.c, io-gif-animation.c, io-ico.c,
      	io-jpeg.c, io-png.c, io-pnm.c, io-ras.c, io-tga.c, io-wbmp.c,
      	io-xbm.c, io-xpm.c, test-gdk-pixbuf.c: Dito for gdk_pixbuf_ref and
      	gdk_pixbuf_unref.
      
      	* Makefile.am, pixops/Makefile.am: Compile everything with
      	-DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED
      
      	* gdk-pixdata.c: Use g_ascii_strup() instead of g_strup().
      
      	* io-xpm.c: Use g_ascii_strcasecmp() instead of g_strcasecmp().
      
      	* demos/testpixbuf-drawable.c, demos/testpixbuf-save.c,
      	demos/testpixbuf-scale.c, demos/testpixbuf.c: Call g_object_ref
      	and g_object_unref instead of gdk_pixbuf_ref and gdk_pixbuf_unref
      	resp.
      d99bd97f
  19. 14 Sep, 2001 1 commit
  20. 21 Aug, 2001 1 commit