summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/gdk-pixbuf-scale.c
Commit message (Collapse)AuthorAgeFilesLines
* gdk-pixbuf-scale: Fix retval introspection for scale_simple()Iñaki García Etxebarria2017-11-281-1/+1
| | | | | | | Add nullable return introspection annotation for gdk_pixbuf_scale_simple() as per existing API documentation. https://bugzilla.gnome.org/show_bug.cgi?id=789934
* gdk-pixbuf-scale: Add a fast path for a no-op scalePhilip Withnall2017-01-101-0/+7
| | | | | | | | If calling gdk_pixbuf_scale_simple() with equal src and dest dimensions, there’s nothing to do, so just return a copy of the src pixbuf. Document the new fast path. https://bugzilla.gnome.org/show_bug.cgi?id=442452
* docs: Document existing scaling and transformation fast pathsPhilip Withnall2017-01-101-0/+5
| | | | | | There are not many, as far as I can see. https://bugzilla.gnome.org/show_bug.cgi?id=442452
* docs: Document the alpha blending function usedPhilip Withnall2017-01-101-0/+6
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=442452
* docs: Use ‘alpha blending’ rather than ‘compositing’Philip Withnall2017-01-101-10/+12
| | | | | | | It’s a slightly more accurate term, as compositing seems to mostly refer to bit-mask composition of two images, rather than blending. https://bugzilla.gnome.org/show_bug.cgi?id=442452
* gdk-pixbuf: Add NULL guards to some utility functionsSarita Rawat2016-12-191-0/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=754878
* Avoid integer overflow in gdk_pixbuf_rotate_simpleMatthias Clasen2015-08-241-1/+1
| | | | | Same as before: don't do ptr = base + y * rowstride if y and rowstride are integers.
* Add _new_from_bytes() and _read_pixels() API, handle read-only pixbufsColin Walters2014-07-181-18/+58
| | | | | | | | | | | | | | | | | | | | | 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
* Add some missing nullability annotations.Evan Nemerson2014-05-161-4/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=730161
* Drop markup from doc commentsMatthias Clasen2014-02-151-14/+7
| | | | | Switch to markdown for our inline markup needs, and turn off sgml mode for the docs.
* Updated FSF's addressDaniel Mustieles2014-01-311-3/+1
|
* Removed entities from the code markup as they are not being expandedXabier Rodriguez Calvar2012-07-301-1/+1
|
* Documentation: Migrate from old tmpl files.Jon Nordby2011-03-061-0/+72
| | | | | | | 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
* Add introspection annotationsJohan Dahlin2010-09-181-4/+4
|
* Replace the aliasing hacks by -Bsymbolic-functionsMatthias Clasen2010-07-091-4/+0
| | | | This is copying similar changes from glib.
* Make it compileMatthias Clasen2010-06-251-0/+1
|
* Bug 561186 – GdkPixbuf API type checking needs cleanupChristian Dywan2008-11-301-8/+8
| | | | | | | | | | | | | | | | | | | 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
* 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
* docu fixes from Guillaume Cottenceau, #454596.Tim Janik2007-07-071-2/+4
| | | | | | | | | | Sat Jul 7 17:34:33 2007 Tim Janik <timj@gtk.org> * gdk-pixbuf-scale.c: docu fixes from Guillaume Cottenceau, #454596. svn path=/trunk/; revision=18390
* Add Sun mediaLib support so that hardware acceleration via mediaLib isBrian Cameron2007-05-161-20/+18
| | | | | | | | | | | | | | | | | | 2007-05-16 Brian Cameron <brian.cameron@sun.com> * acconfig.h, configure.in, gdk/Makefile.am, gdkprivate.h, gdkrgb.c, gdkdraw.c, gdk-pixbuf/gdk-pixbuf-scale.c, gdk-pixbuf/pixops/Makefile.am, gdk-pixbuf/pixops/pixops.[ch], gdk-pixbuf/pixops/timescale.c: Add Sun mediaLib support so that hardware acceleration via mediaLib is enabled if mediaLib is detected via configure. Enhancement request #344813. I was given permission to commit in the bug report by Matthias Clasen. * gdk/medialib.[ch]: New files added for mediaLib support. * docs/reference/gdk-pixbuf/tmpl/scaling.sgml, docs/reference/gdk/tmpl/rgb.sgml, gdk/gdkdraw.c: Add docs for mediaLib support. svn path=/trunk/; revision=17855
* Make PLT-reduction work with gcc4, and don't include everything inMatthias Clasen2005-03-141-1/+3
| | | | | | | | | | | | | | | | | 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
* function doesn't return a value, so don't use g_return_val_if_fail()Manish Singh2004-07-091-0/+1
| | | | | | | | | | | | | Fri Jul 9 15:38:06 2004 Manish Singh <yosh@gimp.org> * gdk-pixbuf-io.c (gdk_pixbuf_format_set_disabled): function doesn't return a value, so don't use g_return_val_if_fail() * gdk-pixbuf-scale.c (gdk_pixbuf_rotate_simple): initialize dest in the can't happen case, to quiet gcc. * io-tiff.c (tifflibversion): enclose in #if TIFFLIB_VERSION >= 20031226.
* New functions to rotate pixbufs by multiples of 90 degrees and to flipMatthias Clasen2004-06-211-0/+148
| | | | | | | | | | Mon Jun 21 00:44:51 2004 Matthias Clasen <maclas@gmx.de> * gdk-pixbuf-transform.h: * gdk-pixbuf-scale.c (gdk_pixbuf_rotate_simple): * gdk-pixbuf-scale.c (gdk_pixbuf_flip): New functions to rotate pixbufs by multiples of 90 degrees and to flip them horizontally or vertically.
* Add a nice figure to the docs.Matthias Clasen2004-06-191-3/+14
|
* _-prefix the nonstatic pixops_... functions. (#142233, Morten Welinder)Matthias Clasen2004-05-101-22/+22
| | | | | | | | | | 2004-05-10 Matthias Clasen <mclasen@redhat.com> * pixops/timescale.c: * pixops/pixops.c: * pixops/pixops.h: * gdk-pixbuf-scale.c: _-prefix the nonstatic pixops_... functions. (#142233, Morten Welinder)
* Fix some warnings by adding casts to PixopsInterpType. (#85839, David L.Owen Taylor2002-07-301-3/+3
| | | | | | | Mon Jul 29 23:06:10 2002 Owen Taylor <otaylor@redhat.com> * gdk-pixbuf-scale.c: Fix some warnings by adding casts to PixopsInterpType. (#85839, David L. Cooper, II.)
* More precise documentation about underscores and mnemonics. (#66380)Matthias Clasen2001-12-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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)
* small doc tweaks, specifically some "just do XYZ" advice next to theHavoc Pennington2001-12-161-19/+38
| | | | | | | | | | | 2001-12-16 Havoc Pennington <hp@pobox.com> * gdk-pixbuf/tmpl/scaling.sgml: small doc tweaks, specifically some "just do XYZ" advice next to the InterpMode technojargon. 2001-12-16 Havoc Pennington <hp@pobox.com> * gdk-pixbuf-scale.c: docs enhancements
* gdk_rgb_init() doesn't need to be called anymore. Use g_object_(un)_refSebastian Wilhelmi2001-11-031-16/+17
| | | | | | | | | | | | | | | | 2001-11-03 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gdk-pixbuf/tmpl/refcounting.sgml, gdk-pixbuf/porting-from-imlib.sgml, tmpl/creating.sgml: gdk_rgb_init() doesn't need to be called anymore. Use g_object_(un)_ref instead of gdk_pixbuf_(un)ref. * tmpl/module_interface.sgml: Typo fix. * gdk-pixbuf/gdk-pixbuf.sgml: Fixed jade complaining about '_' by replacing it with '-'. Now builds again. * gdk-pixbuf-loader.c, gdk-pixbuf-scale.c: Documentation fixes.
* 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.
* Properly offset y coordinate accordining to render_y0.05:27:43 2000 Owen Taylor2000-04-241-3/+6
| | | | | | | | | | 2000-04-22 05:27:43 2000 Owen Taylor <otaylor@redhat.com> * gdk-pixbuf/pixops/pixops.c (pixops_scale_nearest): Properly offset y coordinate accordining to render_y0. * gdk-pixbuf/gdk-pixbuf-scale.c: Properly handle nonzero dest_x, dest_y.
* Most of this patch is based on a patch by Havoc Pennington (hp@redhat.com)Federico Mena Quintero2000-04-111-44/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-58/+58
| | | | | | By order of jrb: const patch for various bits, io-gif.c fixup for animations.
* Added scaling functions into gtk-doc framework.Owen Taylor2000-01-061-12/+12
| | | | | | | | | | | | | | | 2000-01-05 Owen Taylor <otaylor@redhat.com> * doc/Makefile.am doc/gdk-pixbuf-sections.txt doc/gdk-pixbuf.sgml doc/tmpl/scaling.sgml: Added scaling functions into gtk-doc framework. * gdk-pixbuf/gdk-pixbuf-scale.c: Documentation fixes. * gdk-pixbuf/testpixbuf-scale.c (expose_cb): Simplify a bit. * gdk-pixbuf/pixops/pixops.c (pixops_composite_color): Return immediately if scale_x or scale_y is 0.
* Directory full of pixel data scaling code that will eventually migrateOwen Taylor2000-01-051-0/+214
2000-01-05 Owen Taylor <otaylor@redhat.com> * gdk-pixbuf/pixops/: Directory full of pixel data scaling code that will eventually migrate into libart. * configure.in acconfig.h: Add checks for MMX compiler support * gdk-pixbuf/gdk-pixbuf.h gdk-pixbuf/gdk-pixbuf-scale.c: Nice wrapper routines for the code in pixops that operate on pixbufs instead of raw data. * gdk-pixbuf/testpixbuf-scale: Test program for scaling routines.