Commit Graph

670 Commits

Author SHA1 Message Date
Matthias Clasen
aa013939bf Use g_strfreev() to free mime_types. (#117219, Steve Chaplin)
2003-07-11  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkicontheme.c (pixbuf_supports_svg): Use g_strfreev() to free mime_types.
	(#117219, Steve Chaplin)

	* queryloaders.c (query_module): Handle absolute filenames properly. (#117170, Jens Elkner)

	* gdk-pixbuf-io.c: Mention that NULL-terminated arrays returned by
	gdk_pixbuf_format_get_mime_types() and gdk_pixbuf_format_get_extensions() must be
	freed with g_strfreev().
2003-07-11 20:36:25 +00:00
Matthias Clasen
44f044e6cd Support saving ICOs and CURs. 2003-07-03 23:37:34 +00:00
Matthias Clasen
4d3c01795c Stop discriminating against 32bpp ICOs a): Use the byte size of the image
2003-06-28  Matthias Clasen  <maclas@gmx.de>

	* io-ico.c (DecodeHeader): Stop discriminating against 32bpp ICOs a): Use the byte
	size of the image as a heuristic when selecting the bitmap  to load - this lets us
	select 32bpp bitmaps which come after a 8bpp bitmap.
	(OneLineTransp): Stop discriminating against 32bpp ICOs b): Don't overwrite the
	alpha channel of 32bpp ICOs.
	(gdk_pixbuf__ico_image_load_increment): Stop decoding the header unnecessarily.
2003-06-28 20:04:18 +00:00
Soeren Sandmann
8597f10089 Make it compile with C89 compilers.
Fri Jun 27 03:56:59 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* io-gif-animation.c (gdk_pixbuf_gif_anim_frame_composite): Make
	it compile with C89 compilers.

Thu Jun 26 21:41:16 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtktreeviewcolumn.c
	(gtk_tree_view_column_cell_set_cell_data): only set "is_expander"
	and "is_expanded" if the new value is different fromt he old one.
2003-06-27 02:38:44 +00:00
Matthias Clasen
3806847935 Remove the pointless refusal to load images with dubious disposal mode on
2003-06-23  Matthias Clasen  <maclas@gmx.de>

	* io-gif.c (gif_get_frame_info): Remove the pointless refusal to load images with dubious
	disposal mode on the first frame. Just ignore it, as everybody else does.
2003-06-23 20:20:15 +00:00
Matthias Clasen
de07fd2a7e Add gdk_pixbuf_loader_new_with_mime_type.
2003-06-22  Matthias Clasen  <matthias@localhost.localdomain>

	* gdk-pixbuf/gdk-pixbuf-sections.txt: Add gdk_pixbuf_loader_new_with_mime_type.
2003-06-22 19:08:12 +00:00
Matthias Clasen
a378391aaa Reset block_count to 0 for all application extensions, otherwise the data
2003-06-22  Matthias Clasen  <matthias@localhost.localdomain>

	* io-gif.c (gif_get_extension): Reset block_count to 0 for all application extensions, otherwise the data blocks
	of unknown extensions are not propertly skipped.

	Second half of the fix for #106962, handle frames extending beyond the logical screen:

	* io-gif.c (clip_frame): New helper function to clip a rectangle to the logical screen size of the gif.
	(maybe_update): New helper function to call update_func only if the rectangle is not completely off-bounds.
	(gif_get_lzw): Read frames extending outside the logical screen size, but be careful clip to the logical screen size
	when operating on the composite pixbuf and when calling update_func.
	(gif_init): Set the animation size to the logical screen size.
	(gif_get_frame_info): Don't refuse to load images with frames extending beyond the logical screen size.

	* io-gif-animation.c (gdk_pixbuf_gif_anim_frame_composite): Be careful to clip all rectangles to the logical screen
	size, also handle the fact that frames may be completely off-bounds.
2003-06-22 18:08:33 +00:00
Matthias Clasen
d77e5a3341 Merge from 2.2 2003-06-21 00:46:49 +00:00
Matthias Clasen
fcffe5a1ab Add rule to regenerate man pages from Docbook. (man_MANS): Add
2003-06-17  Matthias Clasen  <maclas@gmx.de>

	* gdk-pixbuf/Makefile.am: Add rule to regenerate man pages from
	Docbook.
	(man_MANS): Add gdk-pixbuf-csource.1, gdk-pixbuf-query-loaders.1.
	(content_files): Add gdk-pixbuf-csource.xml,
	gdk-pixbuf-query-loaders.xml.

	* gdk-pixbuf/gdk-pixbuf-csource.xml: New refentry, containing the
	former gdk-pixbuf/gdk-pixbuf-csource.1, converted to Docbook.

	* gdk-pixbuf/gdk-pixbuf-query-loaders.xml: New refentry.

	* gdk-pixbuf/gdk-pixbuf-csource.1:
	* gdk-pixbuf/gdk-pixbuf-query-loaders.1: Man pages generated from
	the .xml sources.

	* gdk-pixbuf/gdk-pixbuf.sgml: Include gdk-pixbuf-csource.xml and
	gdk-pixbuf-query-loaders.xml.

	* gtk/Makefile.am: Add rule to regenerate man pages from Docbook.
	(man_MANS): Add gtk-query-immodules-2.0.1
	(content_files): Add gtk-query-immodules-2.0.xml

	* gtk/gtk-query-immodules-2.0.xml: New refentry.

	* gtk/gtk-query-immodules-2.0.1: Man page generated from the .xml
	source.

	* gtk/gtk-docs.sgml: Include gtk-query-immodules-2.0.xml.


	* acinclude.m4 (JH_PATH_XML_CATALOG, JH_CHECK_XML_CATALOG): New
	macros to check for XML catalog contents and path, borrowed from
	gtk-doc.
	* configure.in: New option --enable-man to enable regeneration of
	man pages from Docbook, if the necessary tools are found.
2003-06-17 00:37:28 +00:00
Matthias Clasen
375a6f4836 Document data_length == -1, add an example. (#97290)
2003-06-03  Matthias Clasen  <maclas@gmx.de>

	* gdk-pixdata.c (gdk_pixbuf_new_from_inline): Document
	data_length == -1, add an example.  (#97290)
2003-06-02 22:46:28 +00:00
Matthias Clasen
5d15f30279 Fix misleading documentation of rowstride. (#113924, Noah Levitt)
2003-06-01  Matthias Clasen  <maclas@gmx.de>

	* gdk-pixdata.h (struct _GdkPixdata): Fix misleading documentation
	of rowstride.  (#113924, Noah Levitt)
2003-05-31 23:52:49 +00:00
Matthias Clasen
83c626bbe0 Remove dubious bitfields of unspecified signedness. (#112919, Morten
2003-05-27  Matthias Clasen  <maclas@gmx.de>

	* io-wbmp.c: Remove dubious bitfields of
	unspecified signedness.  (#112919, Morten Welinder)gdk-p

	* gdk-pixdata.c (gdk_pixdata_to_csource): Replace all occurances
	of g_string_new ("") by g_string_new (NULL). (#106975, Morten Welinder)

	* gtk/gtkwindow-decorate.c:
	* gtk/gtktreeprivate.h:
	* gtk/gtkdnd.c:
	* gdk/win32/gdkwindow-win32.h:
	* gdk/linux-fb/gdkprivate-fb.h:
	* gdk/linux-fb/gdkkeyboard-fb.c: Remove dubious bitfields of
	unspecified signedness.  (#112919, Morten Welinder)

	* gtk/queryimmodules.c (escape_string):
	* gtk/gtktextbtree.c (_gtk_text_btree_get_text):
	* gtk/gtksettings.c (_gtk_settings_parse_convert):
	* gtk/gtkrc.c (gtk_rc_parse_assignment):
	* gtk/gtkinputdialog.c (gtk_input_dialog_set_key):
	* gdk/x11/gdkdisplay-x11.c (escape_for_xmessage): Replace all
	occurances of g_string_new ("") by g_string_new (NULL). (#106975,
	Morten Welinder)
2003-05-27 21:21:00 +00:00
Matthias Clasen
b5adee991a A loader for PCX files. (#113035, Josh Beam)
2003-05-21  Matthias Clasen  <maclas@gmx.de>

	* pixbufloader_pcx.def:
	* io-pcx.c: A loader for PCX files.  (#113035, Josh Beam)

	* gdk-pixbuf-io.c:
	* Makefile.am: Add PCX loader.
2003-05-21 20:20:07 +00:00
Matthias Clasen
ed1ac0e2c6 Improve progressive loading from slow sources: (#107368)
2003-05-19  Matthias Clasen  <maclas@gmx.de>

	Improve progressive loading from slow sources:  (#107368)

	* io-gif-animation.c (gdk_pixbuf_gif_anim_get_iter): Initialize
	first_loop_slowness.
	(gdk_pixbuf_gif_anim_iter_advance): Don't wrap during loading if
	the datasource falls behind the speed of the display.

	* io-gif-animation.h: Add a loading flag to GdkPixbufGifAnim and
	first_loop_slowness to GdkPixbufGifAnimIter.
2003-05-19 21:44:03 +00:00
Owen Taylor
a410bfa04e Add a (gint32 *) => (guint32 *) cast. (#108615, Rick Jones)
Wed May 14 18:24:50 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk-pixdata.c (gdk_pixdata_deserialize): Add a
        (gint32 *) => (guint32 *) cast. (#108615, Rick Jones)
2003-05-14 22:26:41 +00:00
Owen Taylor
629a0e1424 Patch from James Henstridge to update to automake-1.7 (#109542)
Tue May  6 16:50:52 2003  Owen Taylor  <otaylor@redhat.com>

        Patch from James Henstridge to update to automake-1.7
        (#109542)

        * autogen.sh: update to call newer tools.

        * configure.in: various updates, to use M4 macros to put
        variables that change each release at the top.
        Use AC_HELP_STRING to format help strings.
        Use AC_CONFIG_COMMANDS to generate gdkconfig.h.

        * Makefile.am: require Automake 1.7.  Remove gdk-2.0.pc and
        gtk+-2.0.pc on uninstall.  Pass --enable-gtk-doc to configure
        during distcheck.

        * docs/reference/*/Makefile.am: simplify to use the gtk-doc.make
        makefile fragment.

        * */Makefile.am: don't use STRIP_BEGIN/STRIP_END.
        Use BUILT_SOURCES where appropriate.
        Build generated files in builddir rather than srcdir.
        Fix uninstall and distclean targets to satisfy distcheck.

        ===

        * gdk/*/Makefile.am: Remove the hacks to get gdkenumtypes.h
        built first, since we are now using BUILT_SOURCES.

        * gdk/Makefile.am: Remove an outdated comment about gdk_headers.

        * demos/gtk-demo/Makefile.am: Fix srcdir != buildd problem
        with geninclude.pl.

        * configure.in: Update versions to 2.3.0.
2003-05-06 21:55:41 +00:00
Matthias Clasen
691a5fd50a Add sanity checks for GError handling. (#108345) 2003-04-24 18:51:07 +00:00
Owen Taylor
192167b0f8 Exploit the fact that all our filters are separable to simplify the
Tue Apr  1 15:33:51 2003  Owen Taylor  <otaylor@redhat.com>

        * pixops/pixops.c (make_weights): Exploit the fact that all
        our filters are separable to simplify the calculation of
        the weight tables. (Based on a patch from Brian Cameron.)

        * pixops/Makefile.am pixbuf-transform-math.ltx:
        Add a short article describing how the math in pixops.c
        works.
2003-04-01 20:57:25 +00:00
Matthias Clasen
250fd7cc43 Add missing static. (#108614)
2003-03-21  Matthias Clasen  <maclas@gmx.de>

	* gdk-pixbuf-animation.c (gdk_pixbuf_non_anim_get_type): Add
	missing static.  (#108614)
2003-03-21 00:35:15 +00:00
Matthias Clasen
b6d19fe207 Add missing static qualifiers apparently causing problems on some
2003-03-21  Matthias Clasen  <maclas@gmx.de>

	* io-jpeg.c (gdk_pixbuf__jpeg_image_begin_load):
	* io-ico.c (gdk_pixbuf__ico_image_stop_load): Add missing static
	qualifiers apparently causing problems on some platforms. (#108617)
2003-03-21 00:13:17 +00:00
Matthias Clasen
746d1cd9d4 Calculate LineWidth for 16bpp from width, like for the other depths.
2003-03-11  Matthias Clasen  <maclas@gmx.de>

	* io-ico.c (DecodeHeader): Calculate LineWidth for 16bpp from
	width, like for the other depths.  (noticed by Marijn Ros)
2003-03-11 23:02:39 +00:00
Matthias Clasen
d03b2741ad Trivial cleanups (bug #107664) 2003-03-08 20:49:00 +00:00
Matthias Clasen
285a25da03 Return gboolean, not gint. (#107664, Morten Welinder)
2003-03-06  Matthias Clasen  <maclas@gmx.de>

	* gdk/gdkrgb.c (gdk_rgb_try_colormap): Return gboolean, not gint.
	(#107664, Morten Welinder)

	* gdk/x11/gdkwindow-x11.c (gdk_window_get_deskrelative_origin):
	* gdk/x11/gdkfont-x11.c (gdk_font_equal):
	* gdk/x11/gdkdnd-x11.c (gdk_drag_get_protocol_for_display):
	Fix TRUE/1 and FALSE/0 confusion.  (#107664, Morten Welinder)

	* io-gif.c (gif_read): Fix 0/FALSE confusion (#107664, Morten Welinder)
2003-03-06 20:19:11 +00:00
Matthias Clasen
db0dfee6de Always clear the initial frame and "disposed" areas with transparent
2003-02-20  Matthias Clasen  <maclas@gmx.de>

	* io-gif-animation.c (gdk_pixbuf_gif_anim_frame_composite):
	Always clear the initial frame and "disposed" areas with
	transparent pixels, no matter whether the frame has transparency
	or not.  (#55502)
2003-02-19 23:02:03 +00:00
Matthias Clasen
588a0dd2b9 Auxiliary functions used to implement support for arbitrary origins.
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.
2003-02-18 20:12:08 +00:00
Matthias Clasen
64e32006e0 Actually reject images with origin not in the upper-left corner. (#105912)
2003-02-14  Matthias Clasen  <maclas@gmx.de>

	* io-tga.c (try_preload):
	(gdk_pixbuf__tga_load): Actually reject images with origin
	not in the upper-left corner.  (#105912)
2003-02-13 23:50:41 +00:00
Matthias Clasen
f683ed9a0a Better error message if module_open() fails. (#105349, Tim Mooney)
2003-02-06  Matthias Clasen  <maclas@gmx.de>

	* queryloaders.c (query_module): Better error message if
	module_open() fails.  (#105349, Tim Mooney)
2003-02-06 19:31:46 +00:00
Owen Taylor
6c616fa842 Rewrite to run on the .la files rather than looking for .so files.
Mon Jan 27 17:10:30 2003  Owen Taylor  <otaylor@redhat.com>

        * Makefile.am (gdk-pixbuf.loaders): Rewrite to run
        on the .la files rather than looking for .so files.
        (#102142, Martin Gansser)

        * Makefile.am: Don't build gdk-pixbuf.loaders when
        cross-compiling.
2003-01-27 23:17:51 +00:00
Tor Lillqvist
bf04967580 Add gdk_pixbuf_loader_set_size.
2003-01-05  Tor Lillqvist  <tml@iki.fi>

	* gdk_pixbuf.def: Add gdk_pixbuf_loader_set_size.
2003-01-05 02:24:50 +00:00
Tor Lillqvist
0973b993f2 Use correct DLL and import library names, with GTK_API_VERSION in name,
2003-01-05  Tor Lillqvist  <tml@iki.fi>

	* gtk-zip.sh.in: Use correct DLL and import library names, with
	GTK_API_VERSION in name, not GTK_MAJOR_VERSION.GTK_MINOR_VERSION.
	(DEVZIP): Add gdk-pixbuf-query-loaders.exe.

	* configure.in: Improve check for dimm.h.

	* configure.in: Set SOEXT to 'so' on Unix, 'dll' on Win32. Used in
	gdk-pixbuf/Makefile.am.

	* gdk-pixbuf/makefile.mingw.in
	* gdk-pixbuf/pixops/makefile.mingw.in
	* gdk/makefile.mingw.in
	* gdk/win32/makefile.mingw.in
	* gtk/makefile.mingw.in: Remove. Not maintained anyway.

	* gdk-pixbuf/Makefile.am
	* gdk-pixbuf/pixops/Makefile.am
	* gdk/Makefile.am
	* gdk/win32/Makefile.am
	* gtk/Makefile.am
	* configure.in: Remove makefile.mingw{,.in} from here, too.

	* README.win32: Updates. Don't mention the now removed
	makefile.mingw files.

	* gdk/gdk.def
	* gtk/gtk.def: Add a couple of missing entries.

	* gdk/gdkkeynames.c: Include <string.h> for strcmp() and memcpy().

	* gdk/win32/gdkevents-win32.c: Move dimm.h header clash workaround
	earlier.

	* gdk/win32/rc/Makefile.am: Add hack to help
	build/win32/lt-compile-resource decide which kind of libtool
	object file to produce.
2003-01-05 02:24:15 +00:00
Matthias Clasen
12a0888500 Don't crash if gdk-pixbuf.loaders file is missing. (#102222)
2003-01-03  Matthias Clasen  <maclas@gmx.de>

	* gdk-pixbuf-io.c (gdk_pixbuf_new_from_xpm_data): Don't crash if
	gdk-pixbuf.loaders file is missing.  (#102222)
2003-01-02 23:13:11 +00:00
Matthias Clasen
8ba71578f2 Use g_printf instead of system printf. (#99327)
2002-12-15  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcalendar.c:
	* gtk/gtkfilesel.c:
	* gtk/gtkfontsel.c:
	* gtk/gtkhruler.c:
	* gtk/gtkinputdialog.c:
	* gtk/gtkprogress.c:
	* gtk/gtktreemodel.c:
	* gtk/gtkvruler.c:
	* gtk/queryimmodules.c:
	* gtk/theme-bits/decompose-bits.c:
	* gdk-pixbuf/gdk-pixbuf-csource.c:
	* gdk-pixbuf/make-inline-pixbuf.c:
	* gdk-pixbuf/queryloaders.c:
	* gdk/gdkkeynames.c:
	* gdk/gdkrgb.c:
	* gdk/linux-fb/gdkfbmanager.c:
	* gdk/win32/gdkevents-win32.c:
	* gdk/win32/gdkmain-win32.c:
	* gdk/win32/gdkproperty-win32.c:
	* gdk/x11/gdkmain-x11.c: Use g_printf instead of system
	printf.  (#99327)
2002-12-15 01:49:01 +00:00
Matthias Clasen
29969a9081 Add docs. 2002-12-08 00:18:13 +00:00
Owen Taylor
b707bb6c3b Make gdk-pixbuf.loaders also depend gdk-pixbuf-query-loaders. (#97096,
Sat Dec  7 10:14:05 2002  Owen Taylor  <otaylor@redhat.com>

        * Makefile.am (gdk-pixbuf.loaders): Make gdk-pixbuf.loaders
        also depend gdk-pixbuf-query-loaders. (#97096, Daniel Elstner)
2002-12-07 15:16:01 +00:00
Matthias Clasen
a84c7224c0 Remove leftover debug output. (#100357, Owen Taylor)
* io-ico.c: Remove leftover debug output.  (#100357, Owen Taylor)
2002-12-05 21:37:37 +00:00
Bastien Nocera
55f1544e0a use G_BIG_ENDIAN instead of WORDS_BIGENDIAN which isn't set by
2002-12-04  Bastien Nocera  <hadess@hadess.net>

        * io-tiff.c: (tiff_image_parse): use G_BIG_ENDIAN instead of
	WORDS_BIGENDIAN which isn't set by configure.in
2002-12-04 21:07:30 +00:00
Matthias Clasen
f0b823e943 Add deprecation docs.
* gdk-pixbuf-animation.c:
	* gdk-pixbuf.c: Add deprecation docs.
2002-11-29 20:36:26 +00:00
Matthias Clasen
7cb3f99fc7 Document 2.2 API additions. 2002-11-28 00:33:17 +00:00
Owen Taylor
a1fae207be Make gdk-pixbuf.loaders file depend on the loaders (#97096, Jeff Waugh)
Fri Nov  8 19:06:07 2002  Owen Taylor  <otaylor@redhat.com>

        * Makefile.am (gdk-pixbuf.loaders): Make gdk-pixbuf.loaders
        file depend on the loaders (#97096, Jeff Waugh)
2002-11-09 00:10:42 +00:00
Owen Taylor
3f92a70e8b Fix trailing semicolon on macro, clean up a bit.
Wed Nov  6 15:19:53 2002  Owen Taylor  <otaylor@redhat.com>

        * io-gif.c (CHECK_LZW_SP): Fix trailing semicolon on macro,
        clean up a bit.
2002-11-06 20:26:27 +00:00
Matthias Clasen
11c530fe16 Forgotten ChangeLog 2002-11-05 23:57:26 +00:00
Matthias Clasen
037a036f84 Reindent 2002-11-05 22:58:28 +00:00
Owen Taylor
8942a3a2d5 Fix leaked pixbuf reference (#96823, Morten Welinder)
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)
2002-11-05 19:18:56 +00:00
Matthias Clasen
fbccc0848d Check for stack overflow throughout. (#91808, Elliot Lee)
* io-gif.c (lzw_read_byte): Check for stack overflow throughout.
	(#91808, Elliot Lee)
2002-10-22 22:41:58 +00:00
Matthias Clasen
817ad6d3f8 Support the Netscape application extension for gif animations (#95060): 2002-10-20 22:16:58 +00:00
Matthias Clasen
5591c434f8 Documentation updates. 2002-10-11 01:04:45 +00:00
Manish Singh
424f913d43 make it legal C
Thu Oct  3 22:38:12 2002  Manish Singh  <yosh@gimp.org>

        * gdk-pixbuf/queryloaders.c: make it legal C
2002-10-04 05:46:51 +00:00
jacob berkman
562e3caf49 make legal C
2002-10-04  jacob berkman  <jacob@ximian.com>

	* queryloaders.c (query_module): make legal C
2002-10-04 05:23:13 +00:00
Matthias Clasen
45f7541f42 Support for separately installed loaders. (#77486)
* 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)
2002-10-03 22:39:51 +00:00
Owen Taylor
71277f4075 Fix memory leak. (#94399)
Thu Oct  3 18:25:57 2002  Owen Taylor  <otaylor@redhat.com>

        * io-jpeg.c (gdk_pixbuf__jpeg_image_save):
        Fix memory leak. (#94399)
2002-10-03 22:32:39 +00:00
Owen Taylor
352b72d2f2 Patch from Andy Wingo to always escape ? to avoid accidentally generating
Tue Oct  1 17:35:43 2002  Owen Taylor  <otaylor@redhat.com>

        * gdkpixdata.c: Patch from Andy Wingo to always
        escape ? to avoid accidentally generating trigraphs
        in the output (#94631)
2002-10-01 21:42:36 +00:00
Manish Singh
d8efdf0024 add deprecation compile flags
Sun Sep 29 14:22:47 2002 Manish Singh  <yosh@gimp.org>

        * contrib/gdk-pixbuf-xlib/Makefile.am demos/Makefile.am
        demos/gtk-demo/Makefile.am: add deprecation compile flags

        * demos/testanimation.c demos/testpixbuf-save.c demos/testpixbuf.c
        demos/gtk-demo/*.c gdk-pixbuf/gdk-pixbuf-animation.c
        gdk-pixbuf/gdk-pixbuf.c: minor cleanups, getting rid of
        unnecessary casts
2002-09-29 21:24:24 +00:00
Tor Lillqvist
6311f552e1 Don't use .type on Cygwin, either (#91597, Masahiro Sakai).
2002-09-28  Tor Lillqvist  <tml@iki.fi>

	* pixops/*.S: Don't use .type on Cygwin, either (#91597, Masahiro
	Sakai).
2002-09-28 02:50:58 +00:00
Federico Mena Quintero
743a039cd1 Free the context if we cannot allocate the HeaderBuf.
2002-09-27  Federico Mena Quintero  <federico@ximian.com>

	* io-ico.c (gdk_pixbuf__ico_image_begin_load): Free the context if
	we cannot allocate the HeaderBuf.
2002-09-27 22:06:47 +00:00
Federico Mena Quintero
8cec022f3f Fix the update region notification to handle top-to-bottom and
2002-09-27  Federico Mena Quintero  <federico@ximian.com>

	* io-bmp.c (OneLine): Fix the update region notification to handle
	top-to-bottom and bottom-to-top BMPs correctly.
2002-09-27 21:37:30 +00:00
Matthias Clasen
944334da7f Remove the _-prefix from gdk_pixbuf_set_option and
gdk_pixbuf_non_anim_new again.
2002-09-19 21:00:52 +00:00
Matthias Clasen
1e3c6144b4 _-prefix gdk_pixbuf_non_anim_new and gdk_pixbuf_set_option. Adjust all
* 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.
2002-09-17 22:52:44 +00:00
Hans Breuer
11b366a646 added makefile.msc to EXTRA_DIST
2002-09-14  Hans Breuer  <hans@breuer.org>

	* pixops/Makefile.am : added makefile.msc to EXTRA_DIST
2002-09-14 10:50:03 +00:00
Matthias Clasen
549449d7ab Move GdkPixbufFrame from the public header to the gif-animation-specific
* io-gif-animation.h:
	* gdk-pixbuf.h: Move GdkPixbufFrame from the public header to
	the gif-animation-specific private header.  (#91929)
2002-09-12 21:42:10 +00:00
Federico Mena Quintero
8409b23d64 Unref the pixbuf if we hit an unsupported colorspace.
2002-09-12  Federico Mena Quintero  <federico@ximian.com>

	* io-jpeg.c (gdk_pixbuf__jpeg_image_load): Unref the pixbuf if we
	hit an unsupported colorspace.
2002-09-12 20:05:28 +00:00
Matthias Clasen
20c9defaa9 *** empty log message *** 2002-09-06 21:14:33 +00:00
Matthias Clasen
8a1a091f87 New loader, for .ANI animations.
* io-ani.c, io-ani-animation.h, io-ani-animation.c,
	pixbufloader_ani.def, Makefile.am, gdk-pixbuf-io.c: New loader,
	for .ANI animations.
2002-09-06 21:14:15 +00:00
Matthias Clasen
ab97160067 Attach hotspot coordinates to the pixbuf as options "x_hot" and "y_hot".
* io-xpm.c (pixbuf_create_from_xpm):
	* io-xbm.c (gdk_pixbuf__xbm_image_load_real):
	* io-ico.c (DecodeHeader): Attach hotspot coordinates to the
	pixbuf as options "x_hot" and "y_hot".
2002-09-06 21:09:49 +00:00
Matthias Clasen
8abdfd3dcc Don't leak memory if g_try_realloc fails.
* 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)
2002-09-03 23:43:21 +00:00
Tor Lillqvist
c23090c6f1 Add gtk_win32res_lo. (#87101, J. Ali Harlow)
2002-08-25  Tor Lillqvist  <tml@iki.fi>

	* gtk/Makefile.am (libgtk_win32_2_0_la_DEPENDENCIES): Add
	gtk_win32res_lo. (#87101, J. Ali Harlow)

	* gdk-pixbuf/Makefile.am (libgdk_pixbuf_2_0_la_DEPENDENCIES): Add
	gdk_pixbuf_win32res_lo. (#87101, J. Ali Harlow)
2002-08-24 22:54:07 +00:00
Matthias Clasen
c22b614565 gdk-pixbuf-io.c (_gdk_pixbuf_generic_image_load): No longer static, thus
* gdk-pixbuf-io.h:
	gdk-pixbuf-io.c (_gdk_pixbuf_generic_image_load): No longer
	static, thus _gdk_pixbuf-prefixed.

	* gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file):
	Keep this logic in sync with gdk_pixbuf_new_from_file().  (Based
	on a patch by Anders Carlsson)

	* io-png.c (gdk_pixbuf__png_image_save): Plug a memory
	leak.  (#91422, Sven Neumann)
2002-08-22 21:32:06 +00:00
Sven Neumann
0a786328d2 free the result of gdk_pixdata_serialize() (bug #89411).
2002-07-31  Sven Neumann  <sven@gimp.org>

	* gdk-pixdata.c (gdk_pixdata_to_csource): free the result of
	gdk_pixdata_serialize() (bug #89411).
2002-07-31 08:17:43 +00:00
Owen Taylor
96dd6780d4 Fix some warnings by adding casts to PixopsInterpType. (#85839, David L.
Mon Jul 29 23:06:10 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk-pixbuf-scale.c: Fix some warnings by adding
        casts to PixopsInterpType. (#85839, David L. Cooper, II.)
2002-07-30 03:09:39 +00:00
Matthias Clasen
0082e2e838 Avoid unnecessary casting.
* io-ras.c (DoCompressed): Avoid unnecessary casting.
2002-07-16 17:32:08 +00:00
Matthias Clasen
94218b8cfe New function for loading an image from a file either via module->load or
* gdk-pixbuf-io.c (generic_image_load): New function for loading
	an image from a file either via module->load or incrementally.
	(prepared_notify): ModulePreparedNotifyFunc for generic_image_load.
	(gdk_pixbuf_new_from_file): Use generic_image_load.
	* io-bmp.c, io-ico.c, io-ras.c, io-wbmp.c: Remove trivial
	implementations of module->load.  (#71266)
2002-07-07 20:29:48 +00:00
Matthias Clasen
724059ccdf Correct computation of image height. (OneLine): Correct update
* io-ico.c (DecodeHeader): Correct computation of image height.
	(OneLine): Correct update notification.
2002-07-06 23:54:50 +00:00
Matthias Clasen
e4ab381018 Load-at-size functionality for gdk-pixbuf. 2002-07-06 23:10:46 +00:00
Matthias Clasen
09487ff9f5 Handle global_error == NULL better. (tiff_image_parse): Don't trust
* io-tiff.c (tiff_set_error): Handle global_error == NULL
	better.
	(tiff_image_parse): Don't trust TIFFRGBAImageBegin to set
	the "put" routine.  (Fixes #87384)
	(gdk_pixbuf__tiff_image_stop_load): Don't call TIFFClose too
	early.
2002-07-06 08:55:51 +00:00
Matthias Clasen
096e8ea297 Miscellaneous bmp loader fixes (#85448, #86286, #86287):
* io-bmp.c (grow_buffer): New function to avoid crashes
	on unchecked reallocs.
	(DecodeHeader, DecodeColormap, decode_bitmasks,
	DoCompressed): Use grow_buffer instead of g_realloc
	throughout. Change signatures where necessary to pass the
	errors up.
	(OneLine16): Fix loading of 16bpp BI_RGB bmps.
	(DoCompressed): Rewritten to properly support BI_RLE4 and
	skips and jumps.
2002-07-02 17:54:06 +00:00
Matthias Clasen
c43a93f984 Support for compressed ras images (#84994):
* io-ras.c (RAS2State): Error on unsupported ras variations.
	(OneLine8): Fix colormap indexing.
	(OneLine): Call updated_func with proper region.
	(DoCompressed): New function, handles compressed ras data.
	(gdk_pixbuf__ras_image_load_increment): Handle compressed ras
	images.
2002-07-01 22:30:51 +00:00
Matthias Clasen
155aa55bed Better colorspace support for the jpeg loader (#61211):
* io-jpeg.c (convert_cmyk_to_rgb): New function.
	(gdk_pixbuf__jpeg_image_load,
	gdk_pixbuf__jpeg_image_load_increment): Allocate a pixbuf with
	alpha for 4-channel jpegs and call convert_cmyk_to_rgb for these.
2002-07-01 22:20:20 +00:00
Sven Neumann
0c9e03ce2e converted a Tab to spaces.
2002-06-28  Sven Neumann  <sven@gimp.org>

	* gdk-pixbuf-csource.c (print_blurb): converted a Tab to spaces.
2002-06-28 14:14:42 +00:00
Owen Taylor
b27c726a58 Fix problem where when no alpha was involved, we scaled rather than
Thu Jun 13 18:11:11 2002  Owen Taylor  <otaylor@redhat.com>

        * pixops/pixops.c: Fix problem where when no alpha was
        involved, we scaled rather than composited, but then
        went ahead and composited anyways. (#76958, Patch
        from Matthias Clasen). Needs to be merged to GNOME
        1.4 gdk-pixbuf
2002-06-13 22:12:53 +00:00
Owen Taylor
f009b9ff6a Fix problem where when no alpha was involved, we scaled rather than
Thu Jun 13 18:11:11 2002  Owen Taylor  <otaylor@redhat.com>

        * pixops/pixops.c: Fix problem where when no alpha was
        involved, we scaled rather than composited, but then
        went ahead and composited anyways. (#76958, Patch
        from Matthias Clasen). Needs to be merged to GNOME
        1.4 gdk-pixbuf.
2002-06-13 22:11:53 +00:00
Matthias Clasen
ba2bd5533e Use libjpeg in buffered-image mode in order to incrementally display
* io-jpeg.c: Use libjpeg in buffered-image mode in order to
incrementally display incrementally loaded progressive jpegs.
2002-06-13 20:22:59 +00:00
Federico Mena Quintero
ebeb676cf1 New functions to fetch 32 or 16-bit little-endian values starting at a
2002-06-07  Federico Mena Quintero  <federico@ximian.com>

	* io-bmp.c (lsb_32):
	(lsb_16): New functions to fetch 32 or 16-bit little-endian values
	starting at a specific memory location.  We do this instead of
	GINT32_FROM_LE() as the latter is simply dereferences a cast,
	which doesn't work on platforms with alignment requirements.
	Fixes #84083.
2002-06-10 16:50:10 +00:00
Matthias Clasen
61857770ce Accept xbms starting with a C comment - those seem to be not uncommon,
* gdk-pixbuf-io.c (pixbuf_check_xbm): Accept xbms starting
	with a C comment - those seem to be not uncommon, e.g. the Gimp
	produces them.  (#82706)

	* io-xbm.c (read_bitmap_file_data): Don't leak memory on certain
	invalid inputs.
	(gdk_pixbuf__xbm_image_load_real): Don't leak memory on valid inputs.
2002-05-31 23:42:33 +00:00
Tor Lillqvist
7952906cd0 Use GTK_BINARY_VERSION (and not GTK_VERSION) in the path to the loaders on
2002-05-22  Tor Lillqvist  <tml@iki.fi>

	* gdk-pixbuf-io.c (get_libdir): Use GTK_BINARY_VERSION (and not
	GTK_VERSION) in the path to the loaders on Win32, too.

	* Makefile.am: Pass GTK_BINARY_VERSION.
2002-05-22 19:37:30 +00:00
Federico Mena Quintero
1528b0ad85 Ahem, take the rowstride into account!!! Fixes #82515.
2002-05-22  Federico Mena Quintero  <federico@ximian.com>

	* io-xpm.c (pixbuf_create_from_xpm): Ahem, take the rowstride into
	account!!!  Fixes #82515.

	[This bug is not present in the GNOME 1.4 branch as its XPM loader
	does not use gdk_pixbuf_new(); rather it malloc()s a buffer with
	no row padding and then uses gdk_pixbuf_new_from_data() on it.]

	[IMPORTANT: The comment above is to make my life easier when
	merging stuff across branches.  If you make changes to gdk-pixbuf
	in either branch, please include a comment in the ChangeLog that
	indicates whether this should be merged into the other branch.
	Thanks!]
2002-05-22 18:13:44 +00:00
Matthias Clasen
d2686aa951 Check for endianness.
* configure.in: Check for endianness.

	* io-tiff.c (tiff_image_parse): fix packing order on bigendian
	systems.  (#81702)
2002-05-18 14:56:20 +00:00
Owen Taylor
c7efe6f36c Patch from Matthias Clasen to fix some typos (#77246)
Thu May 16 15:17:30 2002  Owen Taylor  <otaylor@redhat.com>

        * pixops/pixops.c: Patch from Matthias Clasen to fix some typos
        (#77246)
2002-05-16 19:18:01 +00:00
Owen Taylor
85a8bdb1fc Fixes for #78258
Thu May 16 14:51:14 2002  Owen Taylor  <otaylor@redhat.com>

        Fixes for #78258

        * gtk/gtkrbtree.c demos/gtk-demo/editable-cells.c:
        Fix some 64-bit warning problems. (Patch from Matthias
        Clasen.)

        * gtk/gtkrbtree.c (_gtk_rbtree_debug_spew_helper): Surround
        a bunch of debug code with G_ENABLE_DEBUG.

        * configure.in demos/gtk-demo/main.c: Replace
        #ifndef G_OS_WIN32 with proper #ifdef HAVE_FLOCKFILE.
2002-05-16 19:11:43 +00:00
Michael Natterer
6c29754a73 build the static pixbuf loaders conditionally like the dynamic ones so
2002-05-07  Michael Natterer  <mitch@gimp.org>

	* gdk-pixbuf/Makefile.am: build the static pixbuf loaders
	conditionally like the dynamic ones so --without-lib<foo> is
	honored when building with --disable-modules. (#66867)
2002-05-07 12:59:18 +00:00
Soeren Sandmann
d269c210c5 image files for testing pixbuf loaders the old test-loaders.c split into
Sun May  5 02:22:59 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* tests/test-images/*: image files for testing pixbuf loaders
	* tests/pixbuf-*.c: the old test-loaders.c split into four
	different programs
	* tests/Makefile.am: add new pixbuf tests

Sun May  5 02:27:01 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* Makefile.am (noinst_PROGRAMS): remove test-loaders (moved to
	gtk+/tests/)
	* test-loaders.c, test-images.h: remove
2002-05-05 00:59:42 +00:00
Matthias Clasen
999748e922 Remove the ISO8859-1 restriction from the description of png tEXt
* gdk-pixbuf-io.c (gdk_pixbuf_save): Remove the ISO8859-1
	restriction from the description of png tEXt parameters.

	* io-png.c (png_text_to_pixbuf_option):
	(gdk_pixbuf__png_image_save): If libpng supports it,
	store and retrieve non-ISO8859-1 text as UTF-8.  (#76172)
2002-04-24 00:09:29 +00:00
Tor Lillqvist
40d637ec03 gdk-pixbuf/Makefile.am (uninstall-libtool-import-lib) Fix typo, thanks to
2002-04-18  Tor Lillqvist  <tml@iki.fi>

	* gdk-pixbuf/Makefile.am (uninstall-libtool-import-lib)
	* gdk/Makefile.am (uninstall-libtool-import-lib): Fix typo,
	thanks to David Sterba for noticing.

	* gtk/gtkmain.h
	* gtk/gtkmain.c (gtk_init_abi_check, gtk_init_check_abi_check): In
	GTK+ 2.0 the GtkWindow struct actually is the same size in gcc on
	Win32 whether compiled with -fnative-struct or not. Unfortunately
	this wan't noticed until now. So, from now on, check some other
	struct, too, for which the use of -fnative-struct still
	matters. GtkBox is one such.
2002-04-18 11:21:21 +00:00
Matthias Clasen
6939510851 More fixes for #77807:
* 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.
2002-04-11 21:18:40 +00:00
Matthias Clasen
3bd5fc010a Use priv->image_module->module_name instead of image_type which may be
* gdk-pixbuf-loader.c (gdk_pixbuf_loader_load_module): Use
	priv->image_module->module_name instead of image_type which may
	be NULL.
2002-04-09 00:38:38 +00:00
Matthias Clasen
71e0ad8d9e Restructured to use gdk_pixbuf_new instead of manually allocating image
* io-png.c (gdk_pixbuf__png_image_load): Restructured to use
	gdk_pixbuf_new instead of manually allocating image storage. This
	gives us a good rowstride and overflow checks.  (#77807)
2002-04-06 18:51:40 +00:00
Matthias Clasen
41446c99be Avoid allocating an extra copy of the image by using a
* io-tiff.c (tiff_image_parse): Avoid allocating an extra copy of
	the image by using a TIFFRGBAImage{Begin,Get,End} with suitable
	put functions instead of TIFFRGBAImage. And check image dimensions
	for overflow.
2002-04-05 21:02:07 +00:00
Matthias Clasen
b7333010d0 Fix a doc typo.
* gdk-pixbuf-loader.c (gdk_pixbuf_loader_get_type): Fix a doc typo.
2002-04-03 18:17:14 +00:00
Matthias Clasen
5c16742258 libpng error handlers must not return to their callers, thus longjmp out.
* io-png.c (png_simple_error_callback): libpng error handlers must
	not return to their callers, thus longjmp out. This prevents
	annoying stderr output from the default error handler.
2002-03-29 21:40:01 +00:00
Matthias Clasen
ec35e8112a Don't leak info_ptr.
* io-png.c (gdk_pixbuf__png_image_stop_load): Don't leak info_ptr.

	* io-png.c (gdk_pixbuf__png_image_load): Get rid of unused
	end_info. Also call png_read_end to check proper ending of the png
	file and catch text chunks after the image data.
2002-03-27 22:12:05 +00:00
Matthias Clasen
266c62df8f Make libpng use g_malloc instead of system malloc.
* io-png.c (gdk_pixbuf__png_image_load,
	gdk_pixbuf__png_image_begin_load): Make libpng use g_malloc
	instead of system malloc.
2002-03-26 23:17:31 +00:00
Matthias Clasen
de19229a33 Don't leak pixbuf on error.
* 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.
2002-03-25 23:22:01 +00:00