Commit Graph

224 Commits

Author SHA1 Message Date
Michael Fulbright
d2bfbdb99e Fixed loading of ASCII PNM files.
1999-11-10  Michael Fulbright  <drmike@redhat.com>

        * src/io-pnm.c (pnm_ascii_read_scanline): Fixed loading of ASCII PNM
	files.

	* src/testpixbuf.c: Added final queued draw when done loading image.
1999-11-10 17:43:49 +00:00
Jonathan Blandford
12474a79ae removed spurious print statements.
1999-11-10  Jonathan Blandford  <jrb@redhat.com>

	* src/gdk-pixbuf-io.c (gdk_pixbuf_load_module): removed spurious
	print statements.
1999-11-10 17:30:13 +00:00
Arturo Espinosa
a3a4606eab Warning fixes - Federico 1999-11-10 15:45:24 +00:00
Federico Mena Quintero
b835084dfa Added documentation.
1999-11-10  Federico Mena Quintero  <federico@redhat.com>

	* src/gdk-pixbuf-io.c (gdk_pixbuf_new_from_xpm_data): Added
	documentation.
1999-11-10 06:40:12 +00:00
Michael Fulbright
78141c328f Fixed up testpixbuf.c to simulate downloading at certain speed, set
env var TBF_KBPS=n to get n kBytes/sec.

Dr Mike
1999-11-09 23:51:35 +00:00
Michael Fulbright
39bb0d649c Possible unsigned int error.
Dr Mike
1999-11-09 23:35:41 +00:00
Michael Fulbright
87a2044934 Doh.
Dr Mike
1999-11-09 23:22:51 +00:00
Michael Fulbright
c9a347c8e9 Slight cosmetic cleanup.
1999-11-09  Michael Fulbright  <drmike@redhat.com>

	* src/io-jpeg.c: Slight cosmetic cleanup.

	* src/io-pnm.c: Fixed raw PNM loading bug. Also discovered that ASCII
        PBM loading has a similar problem and will address tomorrow.
1999-11-09 23:21:08 +00:00
Havoc Pennington
9495faccfc build the gdk-pixbuf-drawable stuff.
1999-11-09  Havoc Pennington  <hp@pobox.com>

* src/Makefile.am (libgdk_pixbuf_la_SOURCES): build the
gdk-pixbuf-drawable stuff.
1999-11-09 22:23:35 +00:00
Arturo Espinosa
f9615262f2 0.4 - Federico 1999-11-09 21:38:26 +00:00
Michael Fulbright
5de53804a1 Figured out problem with loading Progressive JPEG's progressively (say
1999-11-09  Michael Fulbright  <drmike@redhat.com>

* src/io-jpeg.c (image_load_increment): Figured out problem with
loading Progressive JPEG's progressively (say that 10 times fast).
Currently for Progressive JPEG's the entire image is loaded before
it is displayed. libjpeg supports a fancier mechanism which I may
implement later.

With these changes all JPEG formats appear to load properly for me.
1999-11-09 17:24:15 +00:00
Michael Fulbright
665096fcdf Finished progressive PNM loading code. Should handle all types of PNM
1999-11-09  Michael Fulbright  <drmike@redhat.com>

	* src/io-pnm.c : Finished progressive PNM loading code. Should handle
	all types of PNM files now.
1999-11-09 16:38:31 +00:00
Jonathan Blandford
cd02981bf2 Final patch from Arjan. Seems to do progressive loading.
1999-11-08  Jonathan Blandford  <jrb@redhat.com>

	* src/io-ras.c (image_load_increment): Final patch from Arjan.
	Seems to do progressive loading.
1999-11-08 19:37:45 +00:00
Michael Fulbright
ce83490d75 Fixed so we do not create a separate pixel buffer when reading in image -
1999-11-08  Michael Fulbright  <drmike@redhat.com>

	* src/io-pnm.c image_load (): Fixed so we do not create a separate
	pixel buffer when reading in image - we reuse the pixel data in
	the GdkPixbuf structure instead.
1999-11-08 19:02:58 +00:00
Michael Fulbright
6ef7f093d4 Added support for ASCII PNM files. Note I haven't tested loaded ASCII PBM
1999-11-08  Michael Fulbright  <drmike@redhat.com>

	* src/io-pnm.c pnm_read_ascii_scanline (): Added support for
	ASCII PNM files. Note I haven't tested loaded ASCII PBM files because
	I can't seem to find a utility to convert into this format.
	Next is to add progressive loading support for the PNM format.
1999-11-08 17:15:19 +00:00
Federico Mena Quintero
e11f22b55e Finished detailed explanation of the width, height, x, and y setting and
1999-11-07  Federico Mena Quintero  <federico@redhat.com>

	* doc/tmpl/gnome-canvas-pixbuf.sgml: Finished detailed explanation
	of the width, height, x, and y setting and pixels arguments.
1999-11-08 04:19:34 +00:00
Federico Mena Quintero
559a8c8691 Removed gdk-pixbuf-io, since it is for internal use only.
1999-11-05  Federico Mena Quintero  <federico@redhat.com>

	* doc/gdk-pixbuf-sections.txt: Removed gdk-pixbuf-io, since it is
	for internal use only.

	* doc/gdk-pixbuf.sgml: Likewise.

	* doc/tmpl/gnome-canvas-pixbuf.sgml: Finished docs.
1999-11-05 23:58:23 +00:00
Michael Fulbright
66d02a986a Implemented support for reading raw PBM/PGM/PPM files from a file. Next
1999-11-05  Michael Fulbright  <drmike@redhat.com>

	* src/io-pnm.c: Implemented support for reading raw PBM/PGM/PPM
	files from a file. Next step is support for ASCII files, and
	then incremental loading.
1999-11-05 23:17:35 +00:00
Jonathan Blandford
8db40e177c third patch. Now it seems to load.
1999-11-05  Jonathan Blandford  <jrb@redhat.com>

	* src/io-ras.c (image_load): third patch.  Now it seems to load.
1999-11-05 22:42:17 +00:00
Jonathan Blandford
9ab8dfc3e4 second patch Arjan van de Ven <arjan@fenrus.demon.nl> to autodetect/load
1999-11-05  Jonathan Blandford  <jrb@redhat.com>

	* src/gdk-pixbuf-io.c: second patch Arjan van de Ven
	<arjan@fenrus.demon.nl> to autodetect/load the sunras files.
1999-11-05 21:29:33 +00:00
Jonathan Blandford
b71e53b222 new file from Arjan van de Ven <arjan@fenrus.demon.nl> to begin the ras
1999-11-05  Jonathan Blandford  <jrb@redhat.com>

	* src/io-ras.c (image_load): new file from Arjan van de Ven
	<arjan@fenrus.demon.nl> to begin the ras loader.
1999-11-05 20:37:08 +00:00
Federico Mena Quintero
155f3e05e2 Added doc to SUBDIRS.
1999-11-04  Federico Mena Quintero  <federico@redhat.com>

	* Makefile.am: Added doc to SUBDIRS.
1999-11-05 01:58:54 +00:00
Michael Fulbright
01fcce4cf9 Prettied up code slightly. Start of pnm loader (from file and
999-11-04  Michael Fulbright  <drmike@redhat.com>

	* src/io-jpeg.c: Prettied up code slightly.
	* src/io-pnm.c:  Start of pnm loader (from file and progressively).
	                 Doesn't do much yet (will finish tomorrow).
	* src/gdk-pixbuf-io.c: Added pnm to structure of known types.
1999-11-05 00:16:10 +00:00
Arturo Espinosa
9d8da16ee9 More docs work - Federico 1999-11-04 21:52:08 +00:00
Jonathan Blandford
76f716cec7 added the update_func ability
1999-11-04  Jonathan Blandford  <jrb@redhat.com>

	* src/io-gif.c (gif_get_lzw): added the update_func ability
1999-11-04 20:34:24 +00:00
Havoc Pennington
085a27d330 In docs, explain what a dither offset is for.
1999-11-04  Havoc Pennington  <hp@pobox.com>

* src/gdk-pixbuf-render.c (gdk_pixbuf_render_to_drawable): In
docs, explain what a dither offset is for.
(gdk_pixbuf_render_to_drawable_alpha): Explain why you would use
this function vs. gdk_pixbuf_render_to_drawable().
1999-11-04 20:16:17 +00:00
Havoc Pennington
38abc0dee0 Use libart-config correctly; find gnome-config separately. Fix GNOME_LIBS
1999-11-04  Havoc Pennington  <hp@pobox.com>

* configure.in: Use libart-config correctly; find gnome-config
separately. Fix GNOME_LIBS to be correct in "no gnome installed
yet" case.

* src/Makefile.am: Link to GNOME_LIBS instead of a hardcoded
library list.

Patch untested in the inside-gnome-libs case, I need to commit
then check out to the gnome-libs I'm using.
1999-11-04 20:04:02 +00:00
Michael Fulbright
4107506f65 Add update_func callback. Call updated callback when new graphic data
1999-11-04  Michael Fulbright  <drmike@redhat.com>

	* src/io-jpeg.c (image_begin_load): Add update_func callback.
	* src/io-jpeg.c (image_load_increment): Call updated callback when
	new graphic data decoded.
1999-11-04 20:02:37 +00:00
Jonathan Blandford
5d0e9b4a2e fix .tiff loader.
add a testcase for the "updated_area"
1999-11-04 19:22:45 +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
567305020d Populated.
1999-11-04  Federico Mena Quintero  <federico@redhat.com>

	* doc/tmpl/gdk-pixbuf.sgml: Populated.

	* doc/tmpl/refcounting.sgml: Populated.

	* doc/tmpl/file-loading.sgml: Populated.

	* src/gdk-pixbuf.c: Added documentation comments.

	* src/gdk-pixbuf-io.c (gdk_pixbuf_new_from_file): Added
	documentation comments.
1999-11-04 08:14:32 +00:00
Federico Mena Quintero
e9cebcd36a Finished integrating the documentation framework.
1999-11-04  Federico Mena Quintero  <federico@redhat.com>

	* doc/: Finished integrating the documentation framework.
1999-11-04 07:30:04 +00:00
Arturo Espinosa
d5015025ba Integrate gtk-doc, part 1; need to finish it at home - Federico 1999-11-04 01:10:05 +00:00
Arturo Espinosa
e03c0632ad Sync - Federico 1999-11-03 23:58:37 +00:00
Jonathan Blandford
7cdf9176e1 renamed ReadOK to gif_read. Added a lot of comments to the file.
1999-11-03  Jonathan Blandford  <jrb@redhat.com>

	* src/io-gif.c (gif_read): renamed ReadOK to gif_read.
	Added a lot of comments to the file.
1999-11-03 23:22:27 +00:00
Jonathan Blandford
5ee4989714 Remove dependency on lib*gif!!!!
1999-11-03  Jonathan Blandford  <jrb@redhat.com>

	* src/Makefile.am (libpixbuf_gif_la_LIBADD): Remove dependency on
	lib*gif!!!!

Also, some code cleanups to io-gif
1999-11-03 22:27:59 +00:00
Jonathan Blandford
5869210788 set the transparency to the right val.
1999-11-03  Jonathan Blandford  <jrb@redhat.com>

	* src/io-gif.c (gif_get_lzw): set the transparency to the right
          val.
1999-11-03 22:19:42 +00:00
Michael Fulbright
317e8b06ae Further removal of bugginess in local buffering code. Handles grayscale
1999-11-03  Michael Fulbright  <msf@redhat.com>

	* src/io-jpeg.c (image_load_increment): Further removal of
	bugginess in local buffering code. Handles grayscale jpegs
	correctly now.

	* src/io-jpeg.c (image_load_stop): Was freeing local context
	for jpeg library before calling jpeg_decompres_finish ().
1999-11-03 22:00:27 +00:00
Jonathan Blandford
677a78b56a now handle arbitrary buffer sizes.
1999-11-03  Jonathan Blandford  <jrb@redhat.com>

	* src/io-gif.c (image_load_increment): now handle arbitrary buffer
	sizes.
1999-11-03 21:52:16 +00:00
Federico Mena Quintero
0b0e66db4b Initiailize the x and y fields. (gnome_canvas_pixbuf_destroy): Queue a
1999-11-03  Federico Mena Quintero  <federico@redhat.com>

	* src/gnome-canvas-pixbuf.c (gnome_canvas_pixbuf_init):
	Initiailize the x and y fields.
	(gnome_canvas_pixbuf_destroy): Queue a redraw upon destruction.
	(PixbufPrivate): Renamed need_size_update to need_xform_update.
	(recompute_bounding_box): Do not use temporary values.
1999-11-03 21:26:52 +00:00
Jonathan Blandford
87a9022b72 new state. Fixes un-compressed gifs.
1999-11-03  Jonathan Blandford  <jrb@redhat.com>

	* src/io-gif.c (set_gif_lzw_clear_code): new state.  Fixes
	un-compressed gifs.

	* src/gnome-canvas-pixbuf.c (recompute_bounding_box): remove
	unneeded x,y,h,w vars.
1999-11-03 21:22:38 +00:00
Larry Ewing
d0e4efb401 adjust render_affine calculation for x,y offsets.
1999-11-03  Larry Ewing  <lewing@gimp.org>

	* src/gnome-canvas-pixbuf.c (compute_render_affine): adjust
	render_affine calculation for x,y offsets.
	(gnome_canvas_pixbuf_set_arg): add x,y args.
	(gnome_canvas_pixbuf_get_arg): add x,y args.
	(recompute_bounding_box): simply code using ArtDrect and the
	render_affine.  Removed compute_xform_vectors as it was no longer
	needed.
1999-11-03 20:57:04 +00:00
Federico Mena Quintero
80ce14813b I'm a doofus. Return a distance, not a boolean, for opaque images.
1999-11-03  Federico Mena Quintero  <federico@redhat.com>

	* src/gnome-canvas-pixbuf.c (gnome_canvas_pixbuf_point): I'm a
	doofus.  Return a distance, not a boolean, for opaque images.
1999-11-03 20:39:27 +00:00
Federico Mena Quintero
ba718c979c Do proper rounding of bounding box coordinates.
1999-11-03  Federico Mena Quintero  <federico@redhat.com>

	* src/gnome-canvas-pixbuf.c (recompute_bounding_box): Do proper
	rounding of bounding box coordinates.
	(gnome_canvas_pixbuf_bounds): Implemented the ::bounds() method.
	(gnome_canvas_pixbuf_draw): Use the correct alpha threshold value.
1999-11-03 20:26:32 +00:00
Jonathan Blandford
6e0687de46 forgot this 1999-11-03 17:45:41 +00:00
Jonathan Blandford
a8ec2c3b9f s/lwz/lzw/g
1999-11-03  Jonathan Blandford  <jrb@redhat.com>

	* src/io-gif.c (gif_prepare_lzw): s/lwz/lzw/g
1999-11-03 17:45:24 +00:00
Michael Fulbright
3d5a2b1230 Fixed code which moved buffer around as new data comes in to work
1999-11-03  Michael Fulbright  <drmike@redhat.com>

	* src/io-jpg.c image_load_increment(): Fixed code which moved
	buffer around as new data comes in to work properly. JPEG progressive
	loading should be working now except for grayscale JPEG's, which I
1999-11-03 17:17:32 +00:00
Michael Fulbright
afed181c0a changelog 1999-11-03 17:17:11 +00:00
Jonathan Blandford
66bf26d42d initialize a variable; kill a bug 1999-11-03 16:40:43 +00:00
Elliot Lee
5a3e3916f5 A GtkFunction needs to return a value for deterministic behaviour. Also
A GtkFunction needs to return a value for deterministic behaviour. Also put dot printing back in.
1999-11-03 15:57:16 +00:00
3
59ab307a62 Read 'til the next empty block correctly, now.
1999-11-03    <jrb@redhat.com>

	* src/io-gif.c (gif_get_extension): Read 'til the next empty block
	correctly, now.
1999-11-03 05:12:02 +00:00
Arturo Espinosa
1c1e3424c1 Sync to laptop - Federico 1999-11-03 03:16:21 +00:00
Cody Russell
8e6f4fc803 src/gdk-pixbuf-drawable.c: Changed the behavior to return NULL if part of
the requested image is offscreen, rather than clipping the image.
1999-11-03 00:37:40 +00:00
Jonathan Blandford
1588285e3a Fill in the gif's blank areas for interlacing and progressive loading.
1999-11-02  Jonathan Blandford  <jrb@redhat.com>

	* src/io-gif.c (gif_fill_in_lines): Fill in the gif's blank areas
	for interlacing and progressive loading.
1999-11-03 00:20:27 +00:00
Cody Russell
07c656cdf1 src/gdk-pixbuf-drawable.c (gdk_pibxuf_from_drawable_core): Now calls
gdk_pixbuf_new_from_art_pixbuf() instead of gdk_pixbuf_new().
1999-11-02 23:59:03 +00:00
Jonathan Blandford
53d5c49dbb Now progressive gif loading works! It's a little slow though. )-:
1999-11-02  Jonathan Blandford  <jrb@redhat.com>

	* src/io-gif.c (gif_main_loop): Now progressive gif loading works!
	It's a little slow though. )-:
1999-11-02 23:49:22 +00:00
Elliot Lee
587d91caad Make the arguments to the write/load_increment operations const-correct.
* src/gdk-pixbuf-loader.[ch], src/gdk-pixbuf-io.h: Make the arguments to the
write/load_increment operations const-correct.
1999-11-02 23:44:32 +00:00
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
Elliot Lee
b953e64bc6 Always return the amount eaten, rather than the full header size.
Always return the amount eaten, rather than the full header size.
1999-11-02 21:49:46 +00:00
Elliot Lee
966ae7b613 Return TRUE if all the data got eaten by header_buf, instead of FALSE.
Return TRUE if all the data got eaten by header_buf, instead of FALSE.
1999-11-02 20:20:05 +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
97688fd28e revert 1999-11-02 17:17:00 +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
Jonathan Blandford
5dcc2ddd51 lots of lots of work. USE AT YOUR OWN RISK 1999-11-02 01:17:41 +00:00
Arturo Espinosa
c3b9b0f7f4 Sync to desktop - Federico 1999-11-01 19:09:20 +00:00
Jonathan Blandford
827b818ed1 much more work on the progressive loader.
somewhere, some how, I broke something, )-: so all you get is a black
image.  Hopefully, we can load the real image later.
1999-11-01 13:26:03 +00:00
Jonathan Blandford
f3a218acc0 now gif loading works. Time to de-stiticify it and move onto progressive loading 1999-10-31 01:13:25 +00:00
Jonathan Blandford
4adda6ef1f quick hack to restore wotrkingness to regular gifs. Creates a RGBA buffer independent of the gif type. I'll try to get it right later. 1999-10-30 23:17: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
fcdf947205 Fixed small oopsie with grayscale jpeg handling - still not working for progressive 1999-10-29 23:07:23 +00:00
Michael Fulbright
40dfa38a36 Removed erroneous comments.
Dr Mike <drmike@redhat.com>
1999-10-29 22:54:02 +00:00
Michael Fulbright
05505d6a1d image_load_increment(): Fixed bug when image width was not a multiple of 4
1999-10-29  Michael Fulbright  <drmike@redhat.com>

        * src/io-jpeg.c: image_load_increment(): Fixed bug when
        image width was not a multiple of 4 - always use the
        gdk_pixbuf rowstride to increment pointers!
1999-10-29 22:43:51 +00:00
Michael Fulbright
a4a876d70e Added first cut at progressive jpeg loading. Currently does not handle
999-10-29  Michael Fulbright  <drmike@redhat.com>

        * src/io-jpeg.c: Added first cut at progressive jpeg loading.
        Currently does not handle either progressive jpeg files (jpeg
        files with multiple scans at different quality settings), but
        I plan on adding this support soon. These are fairly rare in
        my experience, so it shouldn't slow people down too much.
        Grayscale jpegs also don't work but that should be easy to fix.
1999-10-29 22:37:27 +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
7e96137070 don't send a 0 length buffer.
1999-10-28  Jonathan Blandford  <jrb@redhat.com>

	* src/gdk-pixbuf-loader.c (gdk_pixbuf_loader_write): don't send a
	0 length buffer.
1999-10-28 19:30:11 +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
Arturo Espinosa
9ee4ff5eee Make it build - Federico 1999-10-27 19:15:37 +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
Havoc Pennington
2ec115ea80 oops 1999-10-27 18:24:20 +00:00
Havoc Pennington
5ebe49fdbd Fix typo that prevented compilation (gdk_pixbuf_loader_destroy): ditto
1999-10-27  Havoc Pennington  <hp@pobox.com>

* src/gdk-pixbuf-loader.c (gdk_pixbuf_loader_finalize):
Fix typo that prevented compilation
(gdk_pixbuf_loader_destroy): ditto
1999-10-27 18:24:05 +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
Havoc Pennington
1a0a5d0399 New function to create a blank pixbuf.
1999-10-27  Havoc Pennington  <hp@pobox.com>

* src/gdk-pixbuf.c (gdk_pixbuf_new): New function to create a
blank pixbuf.

* src/gdk-pixbuf-loader.c (gdk_pixbuf_loader_write): Check all
three progressive load funcs are non-NULL, rather than checking
begin_load three times. Also, check whether begin_load returns
NULL on failure.
1999-10-27 17:28:44 +00:00
Michael Fulbright
e8242a24eb Fixed logic so we only try to close loader if it wasn't previously closed.
1999-10-27  Michael Fulbright  <msf@redhat.com>

        * src/gdk-pixbuf-loader.c (gdk_pixbuf_loader_destroy): Fixed
        logic so we only try to close loader if it wasn't previously closed.
1999-10-27 17:08:21 +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
Michael Fulbright
14cb9e710a gdk-pixbuf-loader.c: Fixed init function to properly initialize all
structure members.

testpixbuf.c: Added call to close and destroy pixbuf loader properly.
1999-10-27 16:41:44 +00:00