Commit Graph

25 Commits

Author SHA1 Message Date
Havoc Pennington
4cbca90747 Call the update_area callback depending on the number of rows loaded in
1999-11-22  Havoc Pennington  <hp@pobox.com>

* src/io-png.c (image_load_increment): Call the update_area
callback depending on the number of rows loaded in this increment.

* src/testpixbuf.c (main): slow down the progressive load demo
1999-11-22 23:04:52 +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
Jonathan Blandford
d0ed72ee14 handle the actual update. add a update_func callback. add a update_func
1999-11-04  Jonathan Blandford  <jrb@redhat.com>

	* src/gdk-pixbuf-loader.c (gdk_pixbuf_loader_update): handle the
	actual update.
	* src/io-png.c (image_begin_load): add a update_func callback.
	* src/io-gif.c (image_begin_load): add a update_func callback.
	* src/io-tiff.c (image_begin_load): add a update_func callback.
1999-11-04 18:18:07 +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
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
54f017171f Check properly whether the XPM module has already been loaded
1999-10-27  Havoc Pennington  <hp@pobox.com>

* src/gdk-pixbuf-io.c (gdk_pixbuf_new_from_xpm_data): Check
properly whether the XPM module has already been loaded
(gdk_pixbuf_new_from_file): Check properly if loader module
was already loaded (was checking if load symbol was present
in order to decide whether to re-load; should check module !=
NULL, then load != NULL)
(image_handler_load): Check in present working directory,
makes it easier to debug for now
(file_formats): This array initializer was seriously on crack,
was assigning a function pointer to a GModule*

* src/testpixbuf.c (main): Change type of pixbuf_loader to GdkPixbufLoader*

* src/io-png.c: Progressive loading stuff compiles, untested.
1999-10-27 18:55:00 +00:00
Jonathan Blandford
e5dfd2f5da more work on the incremental loading 1999-10-26 20:43:39 +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
Arturo Espinosa
a3551cc3d0 Comment fixes - Federico 1999-10-22 16:19:59 +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
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
Daniel Veillard
91cb3bb665 Fixed 2 C syntax bugs, Daniel 1999-07-31 17:20:49 +00:00
Mark Crichton
0899b4718b For some wierd reason, the commit yesterday didn't get everything. (99% of
For some wierd reason, the commit yesterday didn't get everything. (99% of
the added code was MISSING)

Wierd.

Mark
1999-07-30 15:34:18 +00:00
Mark Crichton
3d679818a0 Added some first steps for file saving. Big thing is that a
Added some first steps for file saving.  Big thing is that a gdk_pixbuf_save
function needs to be setup.

Mark
1999-07-29 21:17:40 +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
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
Mark Crichton
42311804a4 io-png.c: changed g_malloc call for pixles to art_alloc (to be "correct")
io-png.c: changed g_malloc call for pixles to art_alloc (to be "correct")

io-gif.c: implemented GIF file loading.
1999-06-29 06:07:14 +00:00
Mark Crichton
a83f00d89e Ok, now it determines if it has an alpha channel. If it does, load it, if
Ok, now it determines if it has an alpha channel.  If it does, load it, if
not, don't make one.
1999-06-29 02:54:16 +00:00
Mark Crichton
8854db3c4f Redid io-png for gdk-pixbuf. Note that it'll add an opaque alpha channel
Redid io-png for gdk-pixbuf.  Note that it'll add an opaque alpha channel
to any png that doesn't have one, and will convert greyscale PNGs to RGBA.
1999-06-29 02:36:03 +00:00
Arturo Espinosa
ce87813af6 Stuff I did last night while watching TV 1999-01-05 21:27:07 +00:00
Arturo Espinosa
f876ca2681 Loading framework done, start of PNG loader 1999-01-05 04:31:03 +00:00