Commit Graph

49 Commits

Author SHA1 Message Date
Matthias Clasen
f0175e1ff6 Use a generated table of offsets into a big const string to avoid
2005-03-07  Matthias Clasen  <mclasen@redhat.com>

	* io-xpm.c: Use a generated table of offsets
	into a big const string to avoid relocations
	in the rgb color table. (#168901, Tommi Komulainen)

	* gen-color-table.pl: Script to generate the table,
	copied from Owen Taylors script by the same name
	in Pango.

	* xpm-color-table.h: The generated table.
2005-03-08 03:59:45 +00:00
Matthias Clasen
f5869e6a87 Check the number of scanned items. (#168906, Morten Welinder)
2005-03-03  Matthias Clasen  <mclasen@redhat.com>

	* io-xpm.c (pixbuf_create_from_xpm): Check the number
	of scanned items.  (#168906, Morten Welinder)
2005-03-03 14:02:59 +00:00
Tor Lillqvist
6ba75ff95b gdk-pixbuf-animation.c gdk-pixbuf-io.c io-xbm.c io-xpm.c
2004-12-05  Tor Lillqvist  <tml@iki.fi>

	* gdk-pixbuf-animation.c
	* gdk-pixbuf-io.c
	* io-xbm.c
	* io-xpm.c
	* make-inline-pixbuf.c
	* queryloaders.c: Use gstdio wrappers. Document that file names
	are in the GLib file name encoding.

	* gdk-pixbuf-csource.c
	* queryloaders.c: On Windows, convert command line arguments and
	environment variable values from locale encoding to UTF-8.

	* queryloaders.c: On Windows, use wide character API when
	available.

	* Makefile.am
	* gdk-pixbuf-core.h
	* gdk-pixbuf-io.c
	* gdk-pixbuf-animation.h
	* gdk-pixbuf-animation.c: Like in GLib, for DLL ABI stability on
	Windows, add binary compatibility versions of functions that take
	file names as arguments. They use the system codepage, not GLib
	file name encoding (which is UTF-8 on Windows). Use #defines to
	make newly compiled code use the "real" functions that use the
	GLib file name encoding scheme.
2004-12-05 12:43:47 +00:00
Matthias Clasen
cb918cdb02 Changes to make gdk-pixbuf threadsafe (#157310, #157306, Colin Walters):
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.
2004-11-12 05:34:31 +00:00
Matthias Clasen
ef1d21c0ca *** empty log message *** 2004-09-15 14:33:00 +00:00
Matthias Clasen
2c08beafcf New functions to disable/enable individual loaders and to obtain license
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.
2004-07-08 03:56:36 +00:00
Matthias Clasen
9bff92fbcd Don't use contractions like "don't" or "isn't" in error messages. It isn't
Fri Jun 11 22:02:56 2004  Matthias Clasen  <maclas@gmx.de>

	* io-gif.c, io-pnm.c, io-tga.c, io-xpm.c: Don't use
	contractions like "don't" or "isn't" in error messages.
	It isn't nice to use them in log entries either...
	(#137774, Morten Welinder, patch by Alexander Winston)
2004-06-12 02:08:45 +00:00
Matthias Clasen
d03b2741ad Trivial cleanups (bug #107664) 2003-03-08 20:49:00 +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
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
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
e4ab381018 Load-at-size functionality for gdk-pixbuf. 2002-07-06 23:10:46 +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
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
Sebastian Wilhelmi
c1e9dd9dbd Use g_ascii_strcasecmp() instead of g_strcasecmp().
2001-12-14  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* io-xpm.c: Use g_ascii_strcasecmp() instead of g_strcasecmp().
2001-12-14 09:40:20 +00:00
Sebastian Wilhelmi
d99bd97fe8 Remove assorted G_OBJECT casts where unnecessary.
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.
2001-12-13 21:22:12 +00:00
Owen Taylor
76030813c7 Fill in color fields to black for transparent colors since we'll later
Tue Dec  4 11:45:45 2001  Owen Taylor  <otaylor@redhat.com>
	* io-xpm.c (pixbuf_create_from_xpm): Fill in color
	fields to black for transparent colors since we'll
	later initialize pixels from them. (Fixes purify
	errors, #66093, HideToshi Tajima)
2001-12-04 16:47:49 +00:00
Hans Breuer
cdc4f6a476 use g_strcasecmp(), some poor platforms don't have strcasecmp()
2001-11-18  Hans Breuer  <hans@breuer.org>

	* io-xpm.c : use g_strcasecmp(), some poor platforms
	don't have strcasecmp()

	* makefile.msc : do INCLUDE_png etc. definition here to avoid
	my temporary 'gdk-pixbuf-io-include.h' hack
2001-11-18 15:33:18 +00:00
Daniel Egger
5694bcb0ee Remove unused static function. (xpm_skip_string): Dito.
2001-11-14  Daniel Egger  <degger@fhm.edu>

	* gdk-pixbuf/io-xpm.c:
	(xpm_skip_whitespaces): Remove unused static function.
	(xpm_skip_string): Dito.
	(xpm_extract_color): Declare const variable const to avoid warnings.

	* gtk/gtkfixed.c: (gtk_fixed_map): Remove unused static function.

	* gtk/gtkplug.c: #if 0'ed prototype for #if 0'ed code.

	* gtk/gtksocket.c: Change type of mask to g_message to %ld for
	a long.
2001-11-14 21:50:00 +00:00
Matthias Clasen
f3a65f61a9 io-xpm.c (xpm_extract_color): Rewritten to handle
xpm colormap entries more thoroughly. (#59939)
2001-09-21 21:39:42 +00:00
Matthias Clasen
49b3e05a30 Robustness fixes and test images for the jpeg, tiff, pnm, gif, xpm and tga
loaders.
2001-09-14 22:04:55 +00:00
Havoc Pennington
b4e4a0ed9d fix some shell typos
2001-05-04  Havoc Pennington  <hp@redhat.com>

	* configure.in: fix some shell typos

	* gtk/gtkcolorsel.c (gtk_color_selection_destroy): warning fix

	* gtk/gtkimage.c: handle animations

	* gtk/gtkcheckbutton.c (gtk_check_button_size_request): request
	border_width * 2, not just border_width

	* gtk/gtkscale.c: add "format_value" signal to allow people
	to override the way values are drawn.
	(gtk_scale_get_value_size): fix width/height mistake,
	and compute size from actual displayed text, not
	from made-up text.

	* gtk/gtktexttag.c (gtk_text_tag_class_init): fix return type in
	signal registration

	* tests/testtext.c: Add "Remove all tags" menu item for testing

	* gtk/gtktextbuffer.c (gtk_text_buffer_remove_all_tags): implement

	* demos/gtk-demo/main.c (main): add hack so we can find modules
	without installing gtk

	* demos/gtk-demo/textview.c (insert_text): demo font scaling

	* gtk/gtkcellrenderertext.c: Add "scale" property (font scaling
	factor)
	(gtk_cell_renderer_text_set_property): remove some bogus
	g_object_notify

	* gtk/gtktexttag.c: add "scale" property which is a font scaling
	factor

	* gtk/gtktextlayout.c (add_text_attrs): add font scale attribute
	to layout

	* gtk/gtktextiter.c (gtk_text_iter_is_start): rename from
	gtk_text_iter_is_first

2001-05-04  Havoc Pennington  <hp@redhat.com>

	* pixops/pixops.c (pixops_process): merge fix from stable: Patch
	 from hoshem@mel.comcen.com.au to fix nonzero X offsets.  Fixes
	 bug #50371.

        * gdk-pixbuf/pixops/pixops.c (pixops_composite_nearest): merge
	from stable: Patch from OKADA Mitsuru <m-okada@fjb.co.jp> to fix
	confusion of using "src" instead of "p".
        (pixops_composite_color_nearest): Use a more accurate (and
	correct, to begin with) compositing method.  This cures checks
	showing through on images with no alpha.

	* gdk-pixbuf.c (gdk_pixbuf_fill): fix bug that left some trailing
	bytes unfilled.

	* gdk-pixbuf-io.h: fix UpdatedNotifyFunc to use signed ints

	* gdk-pixbuf-loader.h (struct _GdkPixbufLoaderClass): Change
	area_updated signal to use signed ints.  Removed animation-related
	signals.

	* io-gif.c, io-gif-animation.h, io-gif-animation.c: Massive
	rewrite action

	* gdk-pixbuf-animation.c: Add GdkPixbufAnimationIter to abstract
	all the pesky details. Remove old frame-based API. Make
	GdkPixbufAnimation an abstract base class, derived by the loaders.
2001-05-07 15:58:47 +00:00
Alexander Larsson
82e2421542 Use g_free, since the buffer is allocated with g_try_alloc().
2001-02-07  Alexander Larsson  <alexl@redhat.com>

	* io-xpm.c (free_buffer):
	Use g_free, since the buffer is allocated with g_try_alloc().
2001-02-07 11:37:05 +00:00
Havoc Pennington
e0fee22e78 Add built marshaller files to support GdkPixbufLoader signals
2001-01-22  Havoc Pennington  <hp@redhat.com>

	* Makefile.am: Add built marshaller files to support
	GdkPixbufLoader signals

	* gdk-pixbuf-io.c (gdk_pixbuf_load_module): have
	GDK_PIXBUF_MODULEDIR unconditionally replace the compiled-in
	module location, rather than acting as a fallback, because we are
	using GDK_PIXBUF_MODULEDIR to use gdk-pixbuf before installing it.

	* gdk-pixbuf.h: include gdk-pixbuf-loader.h

        * gdk-pixbuf-loader.h, gdk-pixbuf-loader.c: Move back over here
	from gtk, and add error to close(), because stop_load may do
	parsing of the image.

	* pixops/have_mmx.S (_pixops_have_mmx): add newline at end of file

        * io-*.c: make individual operations static, and add fill_vtable
	functions which are exported. Fix the collection of type warnings
	that surfaced, including a number of functions that didn't
	properly take a GError and some that weren't
	const-correct. Involved adding error handling for a few loaders.

	* gdk-pixbuf-io.h: Add error reporting to stop_load function

	* gdk-pixbuf-io.c (gdk_pixbuf_load_module): change to just look up
	a function that fills in the GdkPixbufModule vtable, instead of
	looking up all the image functions individually; this means we
	can get type safety within modules for the loader functions.
	Also it means you don't have to keep the statically compiled and
	GModule versions in sync.

	* test-gdk-pixbuf.c (main): remove gdk_pixbuf_init()

	* make-inline-pixbuf.c (main): remove call to gdk_pixbuf_init()

	* gdk-pixbuf.h: nuke gdk_pixbuf_init()

	* gdk-pixbuf-animation.c (gdk_pixbuf_frame_get_type): g_type_init
	() here

	* gdk-pixbuf.c (gdk_pixbuf_get_type): g_type_init () here

	* gdk-pixbuf-animation.c (gdk_pixbuf_animation_get_type):
	g_type_init() here


2001-01-22  Havoc Pennington  <hp@redhat.com>

	* demos/testanimation.c: fix to reflect gdk-pixbuf changes

	* demos/testpixbuf.c: fix to reflect gdk-pixbuf changes

	* gtk/gdk-pixbuf-loader.c, gtk/gdk-pixbuf-loader.h:
	Remove, move back to gdk-pixbuf

	* gtk/gtktextiter.c, gtk/gtktextiter.h: add sentence equivalents
	to all the word functions

	* gtk/gtktextview.c (gtk_text_view_start_cursor_blink): return
	before doing anything on NULL layout or if we don't have the focus

	* gtk/testtext.c (fill_example_buffer): "justification"

	* gtk/gtktexttag.h, gtk/gtktexttag.c: change the tag attribute
	to be called "justification" not "justify"

	* demos/gtk-demo/textview.c (create_tags): "justification"

	* gtk/gtktextlayout.c (set_para_values): Handle char-wise wrapping
2001-01-22 23:09:48 +00:00
Hans Breuer
6bda7a895e portability fixes and corrected prototypes for self-contained build 2000-11-12 15:58:18 +00:00
Tor Lillqvist
4a08e76b2b Use g_file_open_tmp() (just added to GLib) instead of mkstemp() (or
2000-11-11  Tor Lillqvist  <tml@iki.fi>

	* io-tiff.c (gdk_pixbuf__tiff_image_begin_load): Use
	g_file_open_tmp() (just added to GLib) instead of mkstemp() (or
	mktemp() and open()).

	* io-xpm.c (gdk_pixbuf__xpm_image_begin_load): Ditto.
2000-11-11 00:34:47 +00:00
Havoc Pennington
7a4c689387 Some updates
2000-10-18  Havoc Pennington  <hp@redhat.com>

	* gtk/gtk-sections.txt: Some updates

	* gdk/gdk-sections.txt: remove GdkPixbufAlphaMode

	* gdk-pixbuf/gdk-pixbuf-sections.txt: Add new API, remove
	GdkPixbufClass/GdkAnimationClass since those are private

	* gdk-pixbuf/Makefile.am (IGNORE_HFILES): ignore more headers

2000-10-18  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextiter.c (gtk_text_iter_forward_to_newline): Fix a bug
	where any number of empty lines would get skipped

	* gtk/gtktextiter.h: Remove padding from GtkTextIter; live on the
	edge.

	* gtk/gtktextiter.c (gtk_text_iter_make_surreal): enhance the
	warning about invalid iterators (explain more thoroughly)
	(gtk_text_iter_in_region): rename gtk_text_iter_in_range

	* gtk/gtktextview.c (FOCUS_EDGE_WIDTH): Make focus rectangle less
	big

	* demos/*.c: Add error handling

	* gtk/gtktextbuffer.c: don't modify const iterators

	* gtk/gdk-pixbuf-loader.c: Add full error handling here

	* gtk/gtkimage.c (gtk_image_set_from_file): ignore errors
	on file load

	* gtk/gtkiconfactory.c: Update to reflect addition of error
	handling to gdk-pixbuf loaders

2000-10-16  Havoc Pennington  <hp@redhat.com>

	* gdk-pixbuf-io.c (gdk_pixbuf_get_module)
	(gdk_pixbuf_get_named_module) (gdk_pixbuf_load_module):
	add error reporting here also

	* make-inline-pixbuf.c (main): use GError

	* io-xpm.c: include unistd.h

	* gdk-pixbuf-util.c: include string.h

	* io-*.c: add error reporting

	* gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file): add
	error reporting

	* gdk-pixbuf-io.c (gdk_pixbuf_new_from_file): Add error reporting

	* gdk-pixbuf-io.h: Add GError** to load_increment and load
	methods

	* gdk-pixbuf-io.c (gdk_pixbuf_save) (gdk_pixbuf_savev): return
	a G_FILE_ERROR if we fail to write or close the file.

	* gdk-pixbuf.h: remove GDK_PIXBUF_ERROR_IO, instead we'll use
	G_FILE_ERROR_*. Rename enum to GdkPixbufError, properly following
	the GError naming rules. Add GError** to load functions.
2000-10-18 18:42:54 +00:00
Havoc Pennington
518f32d97e contrib subdir
2000-10-06  Havoc Pennington  <hp@redhat.com>

	* Makefile.am (SRC_SUBDIRS): contrib subdir

	* gdk/gdkpixbuf.h: Move GdkPixbufAlphaMode to gdk-pixbuf library,
	so it can be used in Xlib version

	* demos/testpixbuf.c (update_timeout): error checking from 1.0
	tree

	* gtk/gdk-pixbuf-loader.c (gdk_pixbuf_loader_get_pixbuf): Sync
	change from 1.0 tree that returns first frame of animation
	if the loaded file is an animation.

        * contrib: add new directory to hold stuff that comes with GTK+
	but isn't really part of GTK+ (for now, gdk-pixbuf-xlib)

	* configure.in: add contrib/*

2000-10-06  Havoc Pennington  <hp@redhat.com>

	* gdk-pixbuf.h: add GdkPixbufAlphaMode

2000-10-06  Havoc Pennington  <hp@redhat.com>

        This entry is a summary of the merged-in changes from 1.0.
	Relevant original ChangeLog entries are spliced in after
	this entry; the files they refer to are from the 1.0
	gdk-pixbuf sources.

	* pixops/pixops.c (pixops_composite_nearest): sync a small fix
	from 1.0

	* io-xpm.c (xpm_seek_string): add fscanf error check from 1.0
	Add progressive loader from 1.0

	* io-tiff.c (gdk_pixbuf__tiff_image_begin_load): mem leak fixes
	from 1.0 tree

	* io-pnm.c: new version from 1.0 tree

	* io-jpeg.c (gdk_pixbuf__jpeg_image_load): sync from 1.0, use
	malloc not g_malloc

	* io-gif.c (lzw_read_byte): sync from 1.0, change a g_error to
	g_warning
	(gif_get_next_step): return 0 here, sync from 1.0

	* gdk-pixbuf-util.c: sync email address change for Cody
	Russell

2000-09-11  Jeffrey Stedfast  <fejj@helixcode.com>

	* gdk-pixbuf/io-pnm.c: Pretty much totally rewrote again because
	last nights code was still "broken". Should now properly handle
	all error conditions gracefully.

2000-09-10  Jeffrey Stedfast  <fejj@helixcode.com>

	* gdk-pixbuf/io-pnm.c: Rewrote.

2000-09-09  Federico Mena Quintero  <federico@helixcode.com>

	* gdk-pixbuf/pixops/pixops.c (pixops_composite_nearest): Compute
	the correct dest offset.

2000-08-25  Federico Mena Quintero  <federico@helixcode.com>

	* gdk-pixbuf/io-xpm.c: #include <unistd.h>

2000-08-05  Larry Ewing  <lewing@helixcode.com>

	* gdk-pixbuf/io-tiff.c: stop leaking context->tempname.

	* gdk-pixbuf/io-xpm.c: same as above.

2000-07-26  Michael Meeks  <michael@helixcode.com>

	* gdk-pixbuf/io-jpeg.c (gdk_pixbuf__jpeg_image_load): make
	g_malloc a malloc.

2000-07-21  Larry Ewing  <lewing@helixcode.com>

	* gdk-pixbuf/io-xpm.c: add a fake progressive loader so that
	xpm at least supports the progressive interface like the one in
	io-tiff.c. This should be reimplemented as an actual progressive
	loader.

2000-07-19  Jonathan Blandford  <jrb@redhat.com>

	* demo/pixbuf-demo.c (update_timeout): changed scaling level to
	make it look better.
	* gdk-pixbuf/testpixbuf.c (update_timeout): Patch from michael
	meeks to handle errors better.
2000-10-09 17:22:20 +00:00
Dan Winship
98c0e90970 Fix comments to not claim that all three of these files are the JPEG image
* io-png.c, io-tiff.c, io-xpm.c: Fix comments to not claim that
	all three of these files are the JPEG image loader. (From
	gdk-pixbuf module.)
2000-10-05 21:40:37 +00:00
Tim Janik
afee2c67c5 applied patch from Andreas Persenius <ndap@swipnet.se> that updates the
Wed Jul 26 12:59:31 2000  Tim Janik  <timj@gtk.org>

        * *.[hc]: applied patch from Andreas Persenius <ndap@swipnet.se> that
        updates the license headers to the GNU Lesser General Public License,
        as well as updating the copyright year to 2000.
2000-07-26 11:33:08 +00:00
Owen Taylor
11056f564b Welcome aboard, gdk-pixbuf.
Wed Jun 21 16:38:13 2000  Owen Taylor  <otaylor@redhat.com>

        * gdk-pixbuf/* docs/reference/gdk-pixbuf/*: Welcome aboard,
	gdk-pixbuf.

	* gtk/gdk-pixbuf-loader.c (gdk_pixbuf_loader_class_init):
	fixups for GObject.

	* gdk/Makefile.am gdk/gdkpixbuf-render.[ch] gdk/gdkpixbuf.[ch]: Bits of
	gdk-pixbuf with GDK dependencies moved into GDK.

	* gtk/Makefile.am gtk/gdk-pixbuf-loader.[ch]: Temporarily
	move gdk-pixbuf-loader here until GObject has signals.

	* demos/: New directory of demos. Move demos from
	gdk-pixbuf here.

	* demos/pixbuf-init.c: Small bit of code to check for
	loaders in ../gdk-pixbuf/.libs/gdk-pixbuf, and if found,
	set GDK_PIXBUF_MODULEDIR appropriately.

	* gdk/gdkcompat.h: Remove GDK_DRAWABLE_PIXMAP compat
	define which no longer makes sense.
2000-06-21 20:47:22 +00:00
Federico Mena Quintero
829ed02435 Most of this patch is based on a patch by Havoc Pennington (hp@redhat.com)
2000-04-11  Federico Mena Quintero  <federico@helixcode.com>

	Most of this patch is based on a patch by Havoc Pennington
	(hp@redhat.com) to make GdkPixbuf's structures opaque and to
	remove the libart dependency.

	* gdk-pixbuf/gdk-pixbuf.h: Removed the public structures.
	(GdkColorspace): New enum that for now only contains
	GDK_COLORSPACE_RGB.
	(GdkPixbufDestroyNotify): New type for the pixbuf's pixels destroy
	notification function.
	(GdkInterpType): New num with interpolation types.

	* *.[ch]: Replace the libart stuff with our own stuff.

	* pixops/*.[ch]: Likewise.

	* gdk-pixbuf/gdk-pixbuf-private.h: New file with the private
	declarations of the GdkPixbuf structures.

	* gdk-pixbuf/gdk-pixbuf.c (gdk_pixbuf_new_from_art_pixbuf):
	Removed function.
	(gdk_pixbuf_get_format): Constify.
	(gdk_pixbuf_get_n_channels): Constify.
	(gdk_pixbuf_get_has_alpha): Constify.
	(gdk_pixbuf_get_bits_per_sample): Constify.
	(gdk_pixbuf_get_pixels): Constify.
	(gdk_pixbuf_get_width): Constify.
	(gdk_pixbuf_get_height): Constify.
	(gdk_pixbuf_get_rowstride): Constify.

	* gdk-pixbuf/gdk-pixbuf.c (gdk_pixbuf_copy): New function to copy
	a pixbuf.

	* gdk-pixbuf/gdk-pixbuf-data.c (gdk_pixbuf_new_from_data): Added a
	bits_per_sample argument; currently only 8 bits per sample are
	supported.

	* gdk-pixbuf/gdk-pixbuf-animation.c (gdk_pixbuf_frame_get_pixbuf):
	New accessor.
	(gdk_pixbuf_frame_get_x_offset): New accessor.
	(gdk_pixbuf_frame_get_y_offset): New accessor.
	(gdk_pixbuf_frame_get_delay_time): New accessor.
	(gdk_pixbuf_frame_get_action): New accessor.

	* gdk-pixbuf/gdk-pixbuf-render.c
	(gdk_pixbuf_render_pixmap_and_mask): Instead of returning a solid
	mask rectangle for pixbufs without an alpha channel, set the
	*mask_return to NULL.

	* gdk-pixbuf/gdk-pixbuf-util.c (gdk_pixbuf_add_alpha): Constify.

	* gdk-pixbuf/gdk-pixbuf-scale.c: Fix includes.

	* gdk-pixbuf/gdk-pixbuf-scale.c (gdk_pixbuf_scale): Added some
	preconditions.  Maybe we should also check for the colorspace,
	bits per pixel, and such.
	(gdk_pixbuf_composite): Likewise.
	(gdk_pixbuf_composite_color): Likewise.
	(gdk_pixbuf_scale_simple): Likewise, and fail gracefully if we
	cannot allocate the new pixbuf.
	(gdk_pixbuf_composite_color_simple): Likewise.

	* gdk-pixbuf/gnome-canvas-pixbuf.c (gnome_canvas_pixbuf_render):
	Use art_rgb_rgba_affine() or art_rgb_affine() since we no longer
	have an ArtPixBuf.

	* gdk-pixbuf/io-bmp.c: Fix includes.

	* gdk-pixbuf/pixops/pixops.c (pixops_scale_nearest): Fixed cast in
	an lvalue.

	* TODO: Populated.

	* configure.in: Removed checks for libart.

	* gdk-pixbuf/Makefile.am: Removed references to libart.
	(noinst_HEADERS): Added gdk-pixbuf-private.h.

	* gdk-pixbuf/Makefile.am (libgdk_pixbuf_la_LDFLAGS): Incremented
	the version number of the libtool library to indicate that this
	definitely is not compatible with the old usage.  I know you love
	me.  I know you do.

	* configure.in: Bumped version number to 0.7.0.

	* README: Updated.

	* gdk-pixbuf-config.in (--libs): We no longer require libart.

	* DEPENDS.libgdk_pixbuf: We no longer depend on libart.

	* gdk-pixbuf.spec.in: Updated, but I don't guarantee anything.
2000-04-11 07:03:25 +00:00
Federico Mena Quintero
79d6346057 0.6.0 - Federico 2000-02-22 00:29:00 +00:00
Mark Crichton
d0f73034cf Iain sent me a xpm that didn't load. It used "g" instead of "c" in it's
Iain sent me a xpm that didn't load.  It used "g" instead of "c" in it's
color table.

I thought that was borked until I saw Imlib, xv, and Gimp load it up w/o
problem...

So, fixed that (less than one line fix).  HOWEVER, if this is correct,
then the gdk XPM loader in gtk+ also has the same problem.

Owen, got an opinion on this?

Mark
2000-02-14 23:26:01 +00:00
Arturo Espinosa
a74de76f94 0.5.0 - Federico 2000-01-22 23:29:21 +00:00
Federico Mena Quintero
25a8142429 #include <config.h>, and fix includes.
1999-12-02  Federico Mena Quintero  <federico@redhat.com>

	* src/testpixbuf.c: #include <config.h>, and fix includes.

	* src/testpixbuf-drawable.c: #include <config.h>, and fix includes.

	* src/io-xpm.c: Fix includes.

	* src/io-tiff.c: Fix includes.

	* src/io-ras.c: Fix includes, and do not include more stuff than needed.

	* src/io-pnm.c: Fix inlcudes, and do not include more stuff than needed.

	* src/io-png.c: Fix includes.

	* src/io-ico.c: Fix includes, and do not include more stuff than needed.

	* src/io-gif.c: Fix includes, and do not include more stuff than needed.

	* src/io-bmp.c: Fix includes, and do not include more stuff than needed.

	* src/gnome-canvas-pixbuf.c: Fix includes.

	* src/gdk-pixbuf.c: Fix includes.

	* src/gdk-pixbuf-util.c: Fix includes.

	* src/gdk-pixbuf-render.c: Fix includes.

	* src/gdk-pixbuf-io.h: Fix includes.

	* src/gdk-pixbuf-drawable.c: Fix includes.

	* src/gdk-pixbuf-drawable.h: Use angle brackets for the gdk-pixbuf
	include files.

	* src/gdk-pixbuf-data.c: Fix includes.

	* src/gdk-pixbuf-loader.c: #include <config.h>

	* src/gdk-pixbuf-loader.h: Use angle brackets for the gdk-pixbuf
	include files.

	* src/Makefile.am: Commented out the gdk-pixbuf-drawable stuff,
	since it is not finished.
1999-12-02 20:44:43 +00:00
Jonathan Blandford
14237d13e2 make the symlink. Does not work for srcdir != buildir != . Beats me why; I
1999-11-22  Jonathan Blandford  <jrb@redhat.com>

	* configure.in (GDK_PIXBUF_DIR): make the symlink.  Does not work
	for srcdir != buildir != .  Beats me why; I can't figure it out.
	AC_OUTPUT_COMMANDS doesn't seem to let me substitute it correctly.
1999-11-22 20:43:58 +00:00
Havoc Pennington
c3c9c72281 Clean up stupid increment-inside-array-dereference thing
1999-10-22  Havoc Pennington  <hp@pobox.com>

* src/io-xpm.c (mem_buffer): Clean up stupid
increment-inside-array-dereference thing

* src/testpixbuf.c: Add XPM data tests.

* src/io-xpm.c: Make the XPM data buffer const, fix const
correctness throughout the code.
1999-10-22 23:26:22 +00:00
Havoc Pennington
5f3ae6ad67 Export this symbol for loading an XPM from memory.
1999-10-22  Havoc Pennington  <hp@pobox.com>

* src/io-xpm.c (image_load_xpm_data): Export this symbol for
loading an XPM from memory.

* src/gdk-pixbuf-io.c (gdk_pixbuf_new_from_xpm_data): New
function, loads pixbuf from xpm data
(image_handler_load): Add g_return_if_fail() to ensure the same
module isn't loaded twice. Add g_module_symbol() to scan for XPM
loader function.
1999-10-22 21:05:16 +00:00
Federico Mena Quintero
7ef5dec32d Removed the unref_fn field. Now all memory management of the buffer is
1999-10-20  Federico Mena Quintero  <federico@redhat.com>

	* src/gdk-pixbuf.h (GdkPixbuf): Removed the unref_fn field.  Now
	all memory management of the buffer is done by libart.

	* src/gdk-pixbuf.c (gdk_pixbuf_unref): Do destruction here.
	Removed gdk_pixbuf_destroy, gdk_pixbuf_duplicate.

	* src/gdk-pixbuf-data.c (gdk_pixbuf_new_from_data): Implemented in
	terms of the libart functions.  Removed the old code.

	* src/gdk-pixbuf-io.c (image_handler_load): Removed the save
	symbols.  Saving will not be implemented in GdkPixbuf.

	* src/io-gif.c: Removed the saving stub.
	(image_load): Fixed memory management to fail gracefully if we run
	out of memory while loading the image.  Close the gif file when we
	are done.  This still needs more error handling for the DGif
	functions.

	* src/io-jpeg.c (image_load): Some robustness fixes.

	* src/io-png.c: Removed the saving stuff.
	(image_load): Some memory management fixes.

	* src/io-tiff.c (image_load): Ditto.

	* src/io-xpm.c (pixbuf_create_from_xpm): Ditto.
1999-10-20 21:20:49 +00:00
Federico Mena Quintero
74268afdeb Reindented to use the GNOME Indentation.
1999-10-18  Federico Mena Quintero  <federico@redhat.com>

	* src/*: Reindented to use the GNOME Indentation.
1999-10-18 19:29:45 +00:00
Michael Meeks
6c13b03a45 Add pixbuf_duplicate,
Fix 'scale' API,
Add gdk_pixbuf_new,
clean io modules a tad.
1999-09-22 22:30:51 +00:00
Federico Mena Quintero
66779b9b26 Set the initial ref_count to 1.
1999-09-17  Federico Mena Quintero  <federico@redhat.com>

	* src/io-bmp.c (image_load): Set the initial ref_count to 1.

	* src/io-gif.c (image_load): Likewise.

	* src/io-jpeg.c (image_load): Likewise.

	* src/io-png.c (image_load): Likewise.

	* src/io-tiff.c (image_load): Likewise.

	* src/io-xpm.c (_pixbuf_create_from_xpm): Likewise.

	* src/gdk-pixbuf-io.c (gdk_pixbuf_load_image): Added an assertion
	for the ref_count to be != 0.
1999-09-17 07:57:25 +00:00
Federico Mena Quintero
49ca2615f8 Fixed compiler warnings. Fixed write to unallocated memory (row_ptr), and
1999-08-09  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* src/io-png.c (image_save): Fixed compiler warnings.  Fixed write
	to unallocated memory (row_ptr), and fixed its type as well.  Take
	into account the ArtPixbuf's rowstride when assigning the row
	pointers.

	* src/gdk-pixbuf.c: Fixup includes.

	* src/gdk-pixbuf-io.c: Likewise.
1999-08-09 06:09:24 +00:00
Larry Ewing
e0fe931832 Fix a few memory leaks in the, most of them in error cases but one or two
1999-07-18  Larry Ewing  <lewing@gimp.org>

	* src/io-xpm.c:
	* src/io-gif.c:
	* src/io-png.c:
	* src/io-jpeg.c: Fix a few memory leaks in the, most of them in
	error cases but one or two in the common case.  There are probably
	a few small ones left.
1999-07-19 04:21:09 +00:00
Mark Crichton
6992607bb0 Ok, we'll try this again.
Ok, we'll try this again.

io-xpm.c: Fixed.  Now actually loads XPMs instead of a big black blob.

configure.in : yes, I know it was broken.  It wasn't finished quite yet (I
always have larger fish to fry)

Oh, and if anyone touches this module again without emailing the people in
AUTHORS, I will go ballistic (after spending precious time figuring out why
this commit never happened the 1st time I tried...)
1999-07-13 01:01:14 +00:00
Mark Crichton
68f895bd68 Massive update...
Massive update...

gdk-pixbuf-io.c: Fixed to compile and run in a very crippled state.

io-bpm.c: Rough start on a WIN/OS2 BMP loader

testpixbuf.c: Really crude test program for gdk-pixbuf

io-gif.c: Fixed some boneheaded uninitalized variables causing the
loader to choke
1999-07-08 16:04:16 +00:00
Mark Crichton
feb9789e64 io-gif.c, io-png.c: Actually put the licencing terms in the code now...
io-gif.c, io-png.c: Actually put the licencing terms in the code now...
io-xpm.c: XPM parser baed off of gdk's, but this does something with the
transparent colors.
1999-06-30 15:28:43 +00:00