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.
* 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-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 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!]
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-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)
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
* 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)
* 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.
* 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)
* 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.
* 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.
* 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.
* 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.
* io-png.c (setup_png_transformations): Changed signature to
return success and set a GError parameter, adjusted all callers.
Also work around a possible FPE in libpng and always check that
the new info is sane.
* io-wbmp.c (gdk_pixbuf__wbmp_image_load_increment):
context->updated_func is NULL during a nonincremental load.
(gdk_pixbuf__wbmp_image_load): Stop reading after the first error.
* io-tga.c: Fix assumptions on rowstride by manually allocating a
contiguous pixel buffer. Catch buffer overruns in RLE-modi.
Support grayscale + alpha (which can be written, but not read (!)
by the Gimp).
* test-images.h: Add valid_ras_test and invalid_bmp_1.
* test-loaders.c (main): Add random tests for ras and pnm and an
invalid bmp which was a crasher until my 2002-03-12 commit.
* io-pnm.c (gdk_pixbuf__pnm_image_load_increment): Don't unref the
pixbuf on errors.
* io-ras.c: Handle some errors.
2002-03-12 Sven Neumann <sven@gimp.org>
* gdk-pixbuf.c (gdk_pixbuf_fill): use sequential writes instead of
calling memcpy(). Simpler and potentially faster. (#70332)
Sat Mar 2 22:11:10 2002 Owen Taylor <otaylor@redhat.com>
* gdk-pixbuf-io.c (_gdk_pixbuf_load_module): If we
can't load the module using the g_module_build_path()
filename, try loading it as a .la file.
* test-loaders.c: Look for modules in current directory
rather than .libs, so we find the right .la files.
* test-loaders.c: Back out some accidental commits.
2002-03-03 Tor Lillqvist <tml@iki.fi>
* gtk-pixbuf.rc.in: Remove.
* gdk_pixbuf.rc.in: Name like this instead (wrong name used by
mistake by Hans).
* makefile.msc: Corresponding changes.
* Makefile.am: Use gdk_pixbuf.rc on Win32. Distribute it.
Wed Feb 27 18:33:04 2002 Owen Taylor <otaylor@redhat.com>
* gdk-pixdata.c (gdk_pixdata_to_csource): Use {} not
() to group around string assigned to char[]. (#72767,
Tomas Ögren)
2002-02-21 Havoc Pennington <hp@pobox.com>
* gdk-pixbuf-loader.c (gdk_pixbuf_loader_load_module): remove
C++-commented debug spew, reported by David L. Cooper
* docs/tutorial/gtk-tut.sgml, examples/paned/paned.c,
examples/paned/Makefile: Make the paned example deprecation-clean.
* various ChangeLog files: correct my email.
* pixops/pixops.c (correct_total): New function to make sure
that the weights sum up to the correct total without introducing
negative weights.
(tile_make_weights, bilinear_make_fast_weights,
bilinear_make_weights): Use correct_total.
* test-images.h (tiff1_test_3), test-loaders.c (main): Add a
(#ifdef 0'ed) test provoking a segfault in TIFFReadDirectory().
* io-ico.c (DecodeHeader): Check that pixbuf could be allocated.
* test-images.h (ico_test_2), test-loaders.c (main): Test the
previous change.
* io-wbmp.c (gdk_pixbuf__wbmp_image_load_increment): Don't write
beyond the end of buffer if width % 8 != 0.
* io-tga.c (try_preload): Enforce that ctx->hdr->type is one of
the supported types, otherwise parse_data_for_row () will not make
any progress, leading to an infinite loop.
Fri Feb 8 23:11:15 2002 Owen Taylor <otaylor@redhat.com>
* pixops/pixops.c: Force all weight arrays to sum exactly
to 65535. (Fixes#70971, reported by Federico Mena Quintero)
* Makefile.am (libgdk_pixbuf_1_3_la_DEPENDENCIES): Add
libpixops.la.
* io-ico.c: Merge 16- and 32-bit ico support from the stable
branch. (#61179)
* io-gif.c: Recomposite all images if the animation size changes
while loading. (#70055)
* gdk-pixbuf.c (gdk-pixbuf-fill): Make it work for subpixbufs.
(#70055)
Sat Jan 19 20:49:20 2002 Manish Singh <yosh@gimp.org>
* io-jpeg.c, io-png.c: Made sure all the error cases involving
jpeg or png load/saves clean themselves up properly. Marked some
variables needed for cleanup volatile so they aren't clobbered by
setjmp.
Fri Jan 11 18:05:07 2002 Owen Taylor <otaylor@redhat.com>
* pixops/pixops.c: Fix integer overflow for the values
passed to the pixel functions. (#55148)
Fri Jan 11 17:53:58 2002 Owen Taylor <otaylor@redhat.com>
* pixops/pixops.c (pixops_scale_nearest): Remove meaningless
FIXME.
* pixops/pixops.c (pixops_process): Comment the computation
of run_end_index and fix some edge cases.
* pixops/{scale_line_22_33_mmx.S, composite_line_22_4a4_mmx.S:
composite_line_color_22_4a4_mmx.S}: Handle the case where
dest <= dest_end properly. (#52001)