Commit Graph

67 Commits

Author SHA1 Message Date
Federico Mena Quintero
cacae33871 Implemented the ::point() method. We do a simple containment test instead
1999-11-02  Federico Mena Quintero  <federico@redhat.com>

	* src/gnome-canvas-pixbuf.c (gnome_canvas_pixbuf_point):
	Implemented the ::point() method.  We do a simple containment test
	instead of a full distance calculation since the canvas is going
	to change to that scheme, anyways.
1999-11-02 23:11:09 +00:00
Elliot Lee
d611593ffd Allow using $TBF_READLEN to specify the size of the chunks that are read
* src/testpixbuf.c: Allow using $TBF_READLEN to specify the size of the chunks that are read from
the input file.
1999-11-02 22:01:43 +00:00
Larry Ewing
9efff07116 add aa render function. (gnome_canvas_pixbuf_class_init): add
1999-11-02  Larry Ewing  <lewing@gimp.org>

	* src/gnome-canvas-pixbuf.c (gnome_canvas_pixbuf_render): add aa
	render function.
	(gnome_canvas_pixbuf_class_init): add gnome_canvas_pixbuf_render
	to class.
1999-11-02 19:43:48 +00:00
Arturo Espinosa
0dcfd50a96 Sync for Larry - Federico 1999-11-02 19:31:11 +00:00
Michael Fulbright
dc999ba470 changelog 1999-11-02 18:26:51 +00:00
Elliot Lee
bf146c95a1 Reorganize gdk_pixbuf_loader_write into three functions, and eliminate
* src/gdk-pixbuf-loader.c: Reorganize gdk_pixbuf_loader_write into three functions, and eliminate
duplication of code from write() and close(). Also fix bug where the 128-byte header was being
written twice.
1999-11-02 16:10:25 +00:00
Federico Mena Quintero
8c361eed9c Fixed bounding box computation.
1999-11-01  Federico Mena Quintero  <federico@redhat.com>

	* src/gnome-canvas-pixbuf.c (recompute_bounding_box): Fixed
	bounding box computation.
1999-11-02 02:17:06 +00:00
Arturo Espinosa
d39cbe9c2b Sync - Federico 1999-11-02 01:50:41 +00:00
Federico Mena Quintero
69fb59dd3b Start of the pixbuf canvas item. Drawing affines seem to work. Bounding
1999-11-01  Federico Mena Quintero  <federico@redhat.com>

	* src/gnome-canvas-pixbuf.c: Start of the pixbuf canvas item.
	Drawing affines seem to work.  Bounding box is fubared.  ::point()
	is not implemented.  This is a work in progress.

	* src/Makefile.am: Added gnome-canvas-pixbuf.[ch] to the list of
	sources.

	* configure.in: Sigh.  We need to link in libgnomeui for the
	canvas stuff.  This mess will disappear when gdk-pixbuf gets
	folded into gnome-libs.
1999-11-02 01:50:06 +00:00
0
bcad6d8598 (ReadImage): lets get the offset right. This will let transparent gifs
1999-10-30    <jrb@redhat.com>

	(ReadImage): lets get the offset right.  This will let transparent
	gifs work.


Right now, gifs with transparency, both interlaced and non-interlaced,
seem to work perfectly fine.  I haven't tried grayscale gifs yet, and I
seem to be getting offset in my RGB buffer with non-alpha gifs. )-:
This leads to pretty, but incorrect, images.

-Jonathan
1999-10-30 23:07:18 +00:00
0
bcf6c51c4c Some more work. Now it generates a gdk_pixbuf of the right size, at a
1999-10-30    <jrb@redhat.com>

	* src/io-gif.c: Some more work.  Now it generates a gdk_pixbuf of
	the right size, at a minimum, even if the image is squished and
	the wrong color.
1999-10-30 22:04:27 +00:00
Jonathan Blandford
2a2a599120 First run at the new gif format. Shouldn't work, unfortunately. 1999-10-30 19:28:53 +00:00
Michael Fulbright
5749f310e4 Actually load the image handler when we determine the image type.
1999-10-29  Michael Fulbright  <drmike@redhat.com>

        * src/gdk-pixbuf-loader.c (gdk_pixbuf_loader_write): Actually
        load the image handler when we determine the image type.

        * src/gdk-pixbuf-io.[ch] (gdk_pixbuf_load_module): Changed the
        previously static function load_image_handler () to
        a public function gdk_pixbuf_load_module (). It is needed in
        gdk-pixbuf-loader.c to load image handler modules.  This function
        is different from gdk_pixbuf_get_module (), which only returns
        a reference to the required handler, because it actually loads
        the handler into memory. Both actions should possibly be combined
        in a convenience function since one w/o the other doesn't seem to
        make much sense.
1999-10-29 19:27:51 +00:00
Federico Mena Quintero
ece5ac121a New function to render a portion of a pixbuf to a drawable. Ignores alpha
1999-10-28  Federico Mena Quintero  <federico@redhat.com>

	* src/gdk-pixbuf-render.c (gdk_pixbuf_render_to_drawable): New
	function to render a portion of a pixbuf to a drawable.  Ignores
	alpha information and takes in a GC.
	(gdk_pixbuf_render_to_drawable_alpha): New function to render a
	portion of a pixbuf to a drawable.  It automatically creates a GC
	and a clipping mask for alpha pixbufs.
1999-10-28 23:25:02 +00:00
Jonathan Blandford
9a1c50c961 turned convenience macros into convenience
1999-10-28  Jonathan Blandford  <jrb@redhat.com>

	* src/gdk-pixbuf.h: turned convenience macros into convenience
1999-10-28 19:00:02 +00:00
Jonathan Blandford
0a810f950f *src/io-tiff.c (image_begin_load): Finished the incremental loader.
1999-10-28  Jonathan Blandford  <jrb@redhat.com>

	*src/io-tiff.c (image_begin_load): Finished the incremental loader.
1999-10-28 16:40:15 +00:00
Jonathan Blandford
5a8b538ee1 started work on the tiff non-incremental loader.
1999-10-28  Jonathan Blandford  <jrb@redhat.com>

	* src/io-tiff.c (image_load_increment): started work on the tiff
	non-incremental loader.

	* src/io-gif.c (image_load_increment): started work on the gif
	incremental loader.

	* src/gdk-pixbuf-io.h: Changed ModuleType to GdkPixbufModule.
1999-10-28 14:46:46 +00:00
Federico Mena Quintero
0eb096334e New function to threshold a pixbuf's alpha channel into a bitmap.
1999-10-27  Federico Mena Quintero  <federico@redhat.com>

	* src/gdk-pixbuf-render.c (gdk_pixbuf_render_threshold_alpha): New
	function to threshold a pixbuf's alpha channel into a bitmap.

	* src/gdk-pixbuf.c (gdk_pixbuf_new): Fixed so that it will
	contemplate future extensions to ArtPixBuf's formats.

	* src/io-png.c (png_info_callback): Use the new API of gdk_pixbuf_new().

	* src/gdk-pixbuf.h (gdk_pixbuf_get_height): Added some convenience
	macros to fetch the ArtPixBuf's fields.
1999-10-27 23:36:44 +00:00
Havoc Pennington
3176b6b3ea blank space cleanups 1999-10-27 20:16:37 +00:00
Havoc Pennington
be374ad560 Display the progressive load
1999-10-27  Havoc Pennington  <hp@pobox.com>

* src/testpixbuf.c (main): Display the progressive load

* src/io-png.c (setup_png_transformations): Break transformation
code into separate function
(png_info_callback): Use setup_png_transformations
1999-10-27 19:42:34 +00:00
Havoc Pennington
2ec115ea80 oops 1999-10-27 18:24:20 +00:00
Federico Mena Quintero
23b0f15ee8 Return a GdkPixbufLoader, not a GtkObject.
1999-10-27  Federico Mena Quintero  <federico@redhat.com>

	* src/gdk-pixbuf-loader.c (gdk_pixbuf_loader_new): Return a
	GdkPixbufLoader, not a GtkObject.
	(gtk_marshal_NONE__INT_INT_INT_INT): Made static.
	(gdk_pixbuf_loader_get_type): Documented.
	(gdk_pixbuf_loader_class_init): Initialize the parent class
	correctly.
	(gdk_pixbuf_loader_destroy): Added sanity checks. Call the parent
	class destroy function.
	(gdk_pixbuf_loader_new): Documented.
	(gdk_pixbuf_loader_finalize): Call the parent class finalize
	function.
	(gdk_pixbuf_loader_write): Use size_t for count.
1999-10-27 17:31:07 +00:00
Michael Fulbright
95e048c863 changelog 1999-10-27 17:08:10 +00:00
Michael Fulbright
929c608714 Incremental loader tweaks.
Dr Mike <drmike@redhat.com>
1999-10-27 16:43:22 +00:00
Jonathan Blandford
a9c16bfabd forgot this 1999-10-27 15:44:41 +00:00
Jonathan Blandford
2ff92119aa Finished initial cut at the object.
1999-10-26  Jonathan Blandford  <jrb@redhat.com>

	* src/gdk-pixbuf-loader.c: Finished initial cut at the object.
1999-10-26 23:19:49 +00:00
Havoc Pennington
3589986260 fix signals
1999-10-26  Havoc Pennington  <hp@pobox.com>

* src/gdk-pixbuf-loader.h: fix signals

* src/gdk-pixbuf-io.h: add new vtable fields
1999-10-26 22:04:29 +00:00
Jonathan Blandford
c84756cf38 New Class. Beginning of progrssive loading.
1999-10-26  Jonathan Blandford  <jrb@redhat.com>

	* src/gdk-pixbuf-loader.h: New Class.  Beginning of progrssive
	loading.
1999-10-26 16:26:00 +00:00
Federico Mena Quintero
5f0ea34beb Patch from Uwe Koloska <koloska@Rcs1.urz.tu-dresden.de> to fix a stupid
1999-10-25  Federico Mena Quintero  <federico@redhat.com>

	* configure.in (CFLAGS): Patch from Uwe Koloska
	<koloska@Rcs1.urz.tu-dresden.de> to fix a stupid typo of mine.
1999-10-25 19:26:13 +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
5cf2775f46 Export gdk_pixbuf_new_from_xpm_data()
1999-10-22  Havoc Pennington  <hp@pobox.com>

* src/gdk-pixbuf.h: Export gdk_pixbuf_new_from_xpm_data()
1999-10-22 21:06:36 +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
9de0d0c9c3 Patch from Kristian Hogsberg Kristensen <hogsberg@daimi.au.dk> to avoid
1999-10-22  Federico Mena Quintero  <federico@redhat.com>

	* src/io-png.c (image_load): Patch from Kristian Hogsberg
	Kristensen <hogsberg@daimi.au.dk> to avoid allocating extra row
	buffers; the rows can be read in directly into the main pixel
	buffer.
1999-10-22 15:18:03 +00:00
Federico Mena Quintero
04823f40c4 Free path.
1999-10-20  Federico Mena Quintero  <federico@redhat.com>

	* src/gdk-pixbuf-io.c (image_handler_load): Free path.
1999-10-21 00:37:21 +00:00
Federico Mena Quintero
d8ce1977dd Bumped version number to 0.3.
1999-10-20  Federico Mena Quintero  <federico@redhat.com>

	* configure.in: Bumped version number to 0.3.

	* src/Makefile.am (lbgdk_pixbuf_la_LDFLAGS): Added a libtool
	version number for the library.
1999-10-20 22:15:13 +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
Havoc Pennington
65c1e7458d New name for macros/autogen.sh
1999-10-18  Havoc Pennington  <hp@pobox.com>

* subautogen.sh: New name for macros/autogen.sh

* autogen.sh: use subautogen.sh
1999-10-18 19:32:25 +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
Havoc Pennington
3b9835b5bb Use AM_PATH_GLIB instead of glib-config directly
1999-10-18  Havoc Pennington  <hp@pobox.com>

* configure.in: Use AM_PATH_GLIB instead of glib-config directly

* src/Makefile.am: Re-enable testpixbuf with GTK_CFLAGS/GTK_LIBS
1999-10-18 19:11:35 +00:00
Havoc Pennington
556f481ce9 didn't get in there or something 1999-10-18 18:58:36 +00:00
Havoc Pennington
748c5c5f0c Remove "macros"
1999-10-18  Havoc Pennington  <hp@pobox.com>

* Makefile.am (SUBDIRS): Remove "macros"

* configure.in: Don't use GNOME_INIT, handle case where we are
inside gnome-libs. AM_PATH_GTK for the GIF test

* src/Makefile.am: Change flags to work without libgnomeui,
comment out testpixbuf for now
1999-10-18 18:58:15 +00:00
Federico Mena Quintero
da95365f93 Use $GTK_LIBS as the extra libs when checking for libgif/libungif, as they
1999-10-18  Federico Mena Quintero  <federico@redhat.com>

	* configure.in: Use $GTK_LIBS as the extra libs when checking for
	libgif/libungif, as they need the X libraries.  Fixes bug #2472.
1999-10-18 18:47:17 +00:00
Cody Russell
a4013d86fb Changed 'pixbuf' variable to 'art_pixbuf' in the core function.
Core function now determines whether the requested geometry is on screen
or not. If part of it is not then the request is clamped to geometry that
is on the screen.
1999-10-10 07:20:37 +00:00
Michael Fulbright
b55008d197 Added support for loading pixbuf from rgb data in memory. Augmented
test program to demonstrate its use.

Need to add support for an alpha channel next.

Dr Mike <drmike@redhat.com>
1999-10-08 23:01:05 +00:00
Cody Russell
c512d3864c Changed the functions to return GdkPixBuf* instead of ArtPixBuf*. 1999-10-07 18:20:16 +00:00
Cody Russell
e41dd6a199 Added #include "gdk-pixbuf-drawable.h" to the top. This fixes remaining
compile error.
1999-10-07 06:22:21 +00:00
Cody Russell
bab6969765 Added gdk-pixbuf-drawable to Makefile.am so it is compiled into
libgdk_pixbuf.
1999-10-07 06:16:16 +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
6fce115b98 Be more paranoid with sanity checking. (gdk_pixbuf_unref): Fix incorrect
1999-09-17  Federico Mena Quintero  <federico@redhat.com>

	* src/gdk-pixbuf.c (gdk_pixbuf_ref): Be more paranoid with sanity
	checking.
	(gdk_pixbuf_unref): Fix incorrect sanity check and comparison.
1999-09-17 05:59:53 +00:00