summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/gdk-pixbuf-util.c
Commit message (Collapse)AuthorAgeFilesLines
* gdk-pixbuf: Add NULL guards to some utility functionsSarita Rawat2016-12-191-1/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=754878
* Avoid integer overflow in gdk_pixbuf_add_alphaMatthias Clasen2015-08-241-9/+9
| | | | | | | Same as before: don't do ptr = base + y * rowstride if y and rowstride are integers. This should fix http://bugzilla.gnome/org/753569
* lib: Don't export gettext init functionBastien Nocera2014-10-241-1/+1
| | | | | abicheck.sh threw an error because of the wrongly prefixed was used in commit: f37f850abe714f19cd3d7e2d5e3bd93483d1ec8a
* lib: Clean up gettext handlingBastien Nocera2014-10-241-2/+6
| | | | | Use glib's i18n support rather than copy pasting it. Note that gdk_pixbuf_gettext() is kept as it's an exported symbol.
* io: extend support for relotations to OS X and LinuxAndoni Morales Alastruey2014-10-221-10/+16
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=737523
* lib: add gdk_pixbuf_win32_get_toplevel to the private APIAndoni Morales Alastruey2014-10-221-4/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=737523
* Add _new_from_bytes() and _read_pixels() API, handle read-only pixbufsColin Walters2014-07-181-6/+13
| | | | | | | | | | | | | | | | | | | | | GdkPixbuf is an old API that predates introspection and GBytes. It has some confusion around whether or not pixbuf data is mutable or not. The _new_from_data() API takes a *const* pointer, but it's not copied, and _get_pixels() returns a non-const copy of the same pointer. There are several cases where we get read-only data, such as a GResource. For language bindings, _new_from_data() doesn't work because the array may be a temporary copy only allocated for the call. In order to support a clean _new_from_bytes() API, we need to add the concept of a read-only pixbuf into the core. The fundamental hack here is that _get_pixels() now causes an implicit copy. For the cases where we don't want to copy, add a new gdk_pixbuf_read_pixels() that returns a proper const pointer. https://bugzilla.gnome.org/show_bug.cgi?id=732297
* Updated FSF's addressDaniel Mustieles2014-01-311-3/+1
|
* Documentation: Migrate from old tmpl files.Jon Nordby2011-03-061-0/+11
| | | | | | | This puts all the docs that existed in tmpl files when gdk-pixbuf was moved out of gtk into inline comments. Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=635643
* Use run-time message catalog directory on WindowsTor Lillqvist2010-12-271-0/+26
| | | | | | | Construct pathname at run-time instead of using a hardcoded GDK_PIXBUF_LOCALEDIR. Should fix bug #634659.
* Add introspection annotationsJohan Dahlin2010-09-181-2/+2
|
* Replace the aliasing hacks by -Bsymbolic-functionsMatthias Clasen2010-07-091-6/+0
| | | | This is copying similar changes from glib.
* Make it compileMatthias Clasen2010-06-251-1/+20
|
* Use "Since: 2.x" instead "Since 2.x"Javier Jardón2009-10-301-1/+1
|
* Bug 561186 – GdkPixbuf API type checking needs cleanupChristian Dywan2008-11-301-2/+2
| | | | | | | | | | | | | | | | | | | 2008-11-30 Christian Dywan <christian@imendio.com> Bug 561186 – GdkPixbuf API type checking needs cleanup * gdk-pixbuf-loader.c (gdk_pixbuf_loader_write), (gdk_pixbuf_loader_get_pixbuf), (gdk_pixbuf_loader_get_animation), (gdk_pixbuf_loader_close), (gdk_pixbuf_loader_get_format): * gdk-pixbuf-scale.c (gdk_pixbuf_scale), (gdk_pixbuf_composite), (gdk_pixbuf_composite_color), (gdk_pixbuf_scale_simple), (gdk_pixbuf_composite_color_simple): * gdk-pixbuf-simple-anim.c (gdk_pixbuf_simple_anim_add_frame): * gdk-pixbuf-util.c (gdk_pixbuf_add_alpha), (gdk_pixbuf_apply_embedded_orientation): Improve type checking in pixbuf API svn path=/trunk/; revision=21832
* Use gdk_pixbuf_copy_area() to copy between pixbufs. Reported by AndreyMatthias Clasen2008-07-151-3/+4
| | | | | | | | | * gdk-pixbuf-utils.c (gdk_pixbuf_saturate_and_pixelate): Use gdk_pixbuf_copy_area() to copy between pixbufs. Reported by Andrey Tsyvarev svn path=/trunk/; revision=20840
* Include "config.h" instead of <config.h> Command used: find -nameJohan Dahlin2008-06-221-1/+1
| | | | | | | | | | | | 2008-06-21 Johan Dahlin <jdahlin@async.com.br> * *.[ch]: Include "config.h" instead of <config.h> Command used: find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g' Rubberstamped by Mitch and Tim svn path=/trunk/; revision=20669
* Note in docstrings that these two functions does not preserve the sourceBjörn Lindqvist2007-08-161-0/+4
| | | | | | | | | | | | 2007-08-17 Björn Lindqvist <bjourne@gmail.com> * gdk-pixbuf/gdk-pixbuf-scale.c (gdk_pixbuf_scale): * gdk-pixbuf/gdk-pixbuf-util.c (gdk_pixbuf_copy_area): Note in docstrings that these two functions does not preserve the source rectangle when copying. (#464840). svn path=/trunk/; revision=18636
* Document the "orientation" option.Matthias Clasen2007-07-021-0/+82
| | | | | | | | | | | | | | | | 2007-07-02 Matthias Clasen <mclasen@redhat.com> * gdk-pixbuf.c (gdk_pixbuf_get_option): Document the "orientation" option. * gdk-pixbuf.symbols: * gdk-pixbuf-core.h: * gdk-pixbuf-util.c (gdk_pixbuf_apply_embedded_orientation): New function to handle Exif orientation information in tiff and jpeg images. (#439567, Michael Chudobiak) svn path=/trunk/; revision=18340
* Clarify the docs ("darkened/brightened" is not "saturation").Federico Mena Quintero2006-01-121-8/+8
| | | | | | | 2006-01-12 Federico Mena Quintero <federico@ximian.com> * gdk-pixbuf-util.c (gdk_pixbuf_saturate_and_pixelate): Clarify the docs ("darkened/brightened" is not "saturation").
* Make PLT-reduction work with gcc4, and don't include everything inMatthias Clasen2005-03-141-1/+5
| | | | | | | | | | | | | | | | | 2005-03-14 Matthias Clasen <mclasen@redhat.com> Make PLT-reduction work with gcc4, and don't include everything in gdk-pixbuf-alias.h: * gdk-pixbuf.symbols: Group symbols by header and source file. * /makegdkpixbufalias.pl: Protect definitions by the same preprocessor symbols used to guard the headers. Move the alias declarations to a separate file which is produced when calling makegdkpixbufalias.pl -def * Makefile.am (gdk-pixbuf-aliasdef.c): Add a rule to generate this file. * *.c: Include gdk-pixbuf-alias.h after the other headers, include gdk-pixbuf-aliasdef.c at the bottom.
* Add hidden aliases for exported symbols which are used internally in orderMatthias Clasen2004-08-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Tue Aug 10 23:53:59 2004 Matthias Clasen <maclas@gmx.de> Add hidden aliases for exported symbols which are used internally in order to get rid of many PLT entries. (#145519, Arjan van de Ven) * gdk/Makefile.am: Add rules to generate gdk_pixbuf.def and gdk-pixbuf-alias.h from gdk-pixbuf.symbols, and make make check check the abi with abicheck.sh. * gdk/gdk-pixbuf.symbols: New file. Definition of the gdk-pixbuf ABI. The file can be processed by cpp to filter out certain subsets of symbols. * gdk/abicheck.sh: New file. Script to check the actually symbols exported from libgdk_pibuf.2.0.so against the symbols found in gdk-pixbuf.symbols. * gdk/makegdkpixbufalias.pl: New file. Perl script to generate the header containing the alias definitions for internally used exported symbols from a list of symbols. * *.c: Include gdk-pixbuf-alias.h
* - Massive cleanup, make actually legible. - Fix some clamp-to-range bugsOwen Taylor2002-01-081-46/+42
| | | | | | | | | | Tue Jan 8 10:58:04 2002 Owen Taylor <otaylor@redhat.com> * gdk-pixbuf-util.c (gdk_pixbuf_saturate_and_pixelate): - Massive cleanup, make actually legible. - Fix some clamp-to-range bugs found by Jim Cape (#68231). - Add a g_return_if_fail() if src and dest alpha don't match. - Allow for src_rowstride != dest_rowstride.
* More precise documentation about underscores and mnemonics. (#66380)Matthias Clasen2001-12-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gtk/gtklabel.c (gtk_label_new_with_mnemonic), gtk/gtkbutton.c (gtk_button_new_with_mnemonic): More precise documentation about underscores and mnemonics. (#66380) * gtk/gtktextiter.c (gtk_text_iter_backward_word_starts): Fix cyclic reference in docs. * gtk/gtklabel.c (gtk_label_set_justify): Correct documentation of default value. (#65402) * gtk/gtkmain.c (gtk_set_locale, gtk_disable_set_locale): Markup fixes. * gdk-pixbuf-io.c, gdk-pixbuf-animation.c, gdk-pixbuf-data.c, gdk-pixbuf-loader.c, gdk-pixbuf-scale.c, gdk-pixbuf-util.c, gdk-pixdata.c: Markup fixes. * gtk/text_widget.sgml: More precise wording. (#63388) * gtk/tmpl/gtksignal.sgml (GTK_SIGNAL_OFFSET): Add docs. * gtk/resources.sgml: Fix markup of mail URLs. * gtk/tmpl/gtkpaned.sgml, gtk/tmpl/gtkobject.sgml: Markup fixes. * gtk/tmpl/gtktoolbar.sgml (gtk_toolbar_{prepend,append}_element): Expand documentation. (#60471) * gtk/tmpl/gtkmain.sgml: Remove misleading information about gtk_set_locale(). (#65758)
* Markup fixes.Matthias Clasen2001-12-121-3/+3
| | | | * gdk-pixbuf-loader.c, gdk-pixbuf-util.c: Markup fixes.
* Handle case where we need to parse the xsetting as if it were an RC fileHavoc Pennington2001-06-041-21/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-05-10 Havoc Pennington <hp@redhat.com> * gtk/gtksettings.c (gtk_settings_get_property): Handle case where we need to parse the xsetting as if it were an RC file string. * gtk/gtkcolorsel.c (gtk_color_selection_class_init): load initial value of palette from settings, not from static variable * gdk/x11/gdkevents-x11.c: add color palette, toolbar mode to xsettings translation table * gtk/gtktoolbar.c (gtk_toolbar_new): Remove arguments, because hardcoding the toolbar style conflicts with new customizable toolbar style philosophy (gtk_toolbar_class_init): add settings for default toolbar style; these are used unless the app specifically forces a toolbar style * gtk/gtksettings.c (settings_install_property_parser): only return at the start if we warn and parser == NULL * gtk/gtkcolorsel.c (gtk_color_selection_finalize): disconnect the palette changed handler so we don't notify dead color selections * gtk/gtkstyle.c (gtk_default_draw_shadow): handle xthickness/ythickness of 0 or 1 properly (gtk_default_draw_resize_grip): clear the background behind the resize grips, and align to bottom right if we square the area to be drawn. * gtk/gtkstatusbar.c (gtk_statusbar_init): set horizontal usize on statusbar label to 1, so it doesn't make toplevels resize oddly (gtk_statusbar_size_request): add grip size to request (gtk_statusbar_size_allocate): hack so the hbox still works with the grip size in the request * gtk/gtktoolbar.c (gtk_toolbar_show_all): override to fix bug where showing all on a toplevel makes the toolbar button text appear despite the toolbar mode * gtk/gtkmenubar.c: add internal padding style property * gtk/gtktoolbar.c: Add internal padding style property; add shadow type style property * gtk/gtkmenubar.c (gtk_menu_bar_paint): paint box with widget state; and put Container::border_width outside the frame * gtk/gtktextview.c: don't draw focus rectangle if we're in interior focus mode, we just use blinking cursor
* fix some shell typosHavoc Pennington2001-05-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Some updatesHavoc Pennington2000-10-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* contrib subdirHavoc Pennington2000-10-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Move more text widget headers into the private header listHavoc Pennington2000-09-261-0/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-09-26 Havoc Pennington <hp@redhat.com> * gtk/Makefile.am (gtk_private_h_sources): Move more text widget headers into the private header list * Makefile.am (pkgconfig_DATA): install pkg-config files * configure.in: add pkg-config files * gdk-2.0.pc.in, gdk-pixbuf.pc.in, gtk+-2.0.pc.in: pkg-config files * gtk/gtkwindow.c (gtk_window_read_rcfiles): Invalidate outstanding icon caches on theme change. * gtk/gtkiconfactory.h, gtk/gtkiconfactory.c: New icon system. Three important types: (GtkIconSource): Specification for creating a pixbuf appropriate for a direction/state/size triplet from a source pixbuf or filename (GtkIconSet): List of GtkIconSource objects that are used to create the "same" icon (e.g. an OK button icon), and cache for rendered icons (GtkIconFactory): Hash from stock ID to GtkIconSet; used to look up the icon set for a given stock ID. GTK maintains a stack of GtkIconFactory to search, and applications or libraries can add additional icon factories on top of the stack * gtk/gtkrc.h, gtk/gtkrc.c: When loading an RcStyle, parse the set of GtkIconSource specified for a given stock ID into a GtkIconSet, and put the GtkIconSet into a GtkIconFactory for the RcStyle, under the specified stock ID. * gtk/gtkstyle.h, gtk/gtkstyle.c: Add a virtual function render_icon used to derive a GdkPixbuf from a GtkIconSource. This allows people to theme how prelight, insensitive, etc. are done. (gtk_style_lookup_icon_set): Look up a stock ID in the list of icon factories for a style, and return the resulting icon set if any. (gtk_style_render_icon): Render an icon using the render_icon method in the GtkStyleClass. * gtk/gtkwidget.h, gtk/gtkwidget.c (gtk_widget_render_icon): Use the style for a given widget to look up a stock ID, get the icon set, and render an icon using the render_icon method of the style * gtk/gtkstock.h, gtk/gtkstock.c: Header with the GtkStockItem type (contains information about a stock item), the built-in stock item IDs, and functions to add/lookup stock items. * gtk/stock-icons/*: Stock icons that come with GTK * gtk/gtkbutton.h, gtk/gtkbutton.c (gtk_button_new_stock): Returns a button based on a GtkStockItem (gtk_button_new_accel): Takes a uline string and accel group, and installs the accelerator. * gtk/gtkimage.h, gtk/gtkimage.c: Make this into a generic image-display widget.
* applied patch from Andreas Persenius <ndap@swipnet.se> that updates theTim Janik2000-07-261-3/+3
| | | | | | | | 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.
* Most of this patch is based on a patch by Havoc Pennington (hp@redhat.com)Federico Mena Quintero2000-04-111-31/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* By order of jrb: const patch for various bits, io-gif.c fixup forMichael Meeks2000-02-031-2/+3
| | | | | | By order of jrb: const patch for various bits, io-gif.c fixup for animations.
* Removed the broken --enable-canvas-pixbuf option. Added the stuffFederico Mena Quintero2000-01-171-51/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-01-16 Federico Mena Quintero <federico@helixcode.com> * configure.in: Removed the broken --enable-canvas-pixbuf option. Added the stuff necessary to substitute the variables in gnomecanvaspixbufConf.sh.in. * gnomecanvaspixbufConf.sh.in: New gnome-config handler for the tiny gnomecanvaspixbuf library. * Makefile.am: Build gnomecanvaspixbufConf.sh. * gdk-pixbuf/Makefile.am: Create a libgnomecanvaspixbuf and only build it if gdk-pixbuf is being built outside of gnome-libs. * doc/gdk-pixbuf-sections.txt: Added gdk_pixbuf_render_pixmap_and_mask(). * gdk-pixbuf/gdk-pixbuf-render.c (gdk_pixbuf_render_pixmap_and_mask): Renamed from gdk_pixbuf_render_pixmap(). Do not create the mask if it is not needed, and do not use a clipping mask when rendering the pixmap. Tweaked documentation a little. * HACKING: New file with hacking policies for the gdk-pixbuf module. * doc/Makefile.am (tmpl_sources): Added missing backslash. * doc/Makefile.am: Use gnomecanvaspixbuf in gnome-config when scanning for docstrings. * gdk-pixbuf/gdk-pixbuf-util.c (gdk_pixbuf_copy_area): Made sanity checks more stringent. Removed "gint" abominations. Made documentation consistent with the rest of the functions. * doc/gdk-pixbuf-sections.txt: Added gdk_pixbuf_copy_area() to the utilities section.
* Added gdk_pixbuf_copy_area() to gdk-pixbuf-utils.c and gdk-pixbuf.h.Cody Russell2000-01-131-1/+60
| | | | Removed some unused variable warnings in gdk-pixbuf-drawable.c.
* #include <config.h>, and fix includes.Federico Mena Quintero1999-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* New file with utility and convenience functions for pixbufs.Federico Mena Quintero1999-12-021-0/+95
1999-12-02 Federico Mena Quintero <federico@redhat.com> * src/gdk-pixbuf-util.c: New file with utility and convenience functions for pixbufs. * src/Makefile.am (libgdk_pixbuf_la_SOURCES): Added gdk-pixbuf-util.c. * doc/gdk-pixbuf-sections.txt: Added section for utility functions. * doc/Makefile.am (tmpl_sources): Added tmpl/util.sgml. * doc/gdk-pixbuf.sgml: Added the utilities section. * doc/tmpl/util.sgml: Documentation for the utility functions.