summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/gdk-pixbuf.c
Commit message (Collapse)AuthorAgeFilesLines
* gdk_pixbuf_new() - Clear the pixbuf's memory buffer to avoid returning ↵Federico Mena Quintero2022-01-251-1/+1
| | | | | | uninitialized memory Fixes https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/issues/199
* docs: Fix the image-data linkEmmanuele Bassi2021-05-191-2/+2
| | | | Reference the anchor in the class description.
* docs: Clean up GdkPixbuf's core APIEmmanuele Bassi2021-03-211-70/+106
| | | | Use proper summaries; remove gtk-doc'isms; document properties.
* docs: Port to the gi-docgen syntax and styleEmmanuele Bassi2021-03-211-110/+120
| | | | | Drop the gtk-doc SECTION markers, and move documentation to classes or separate documents.
* docs: Move the core data section to the source fileEmmanuele Bassi2020-06-261-0/+68
| | | | | | | The relative links in the functions documentation stanza refer to the current section; this means that, in order to refer to an anchor specified in a section the symbols must be in the same section within the same file.
* (#91): Have a STORAGE_UNINITIALIZED for construction with all-default propertiesFederico Mena Quintero2019-09-111-97/+182
| | | | | | | | | | | | | | | | | | | If one does a plain GdkPixbuf *pixbuf = g_object_new (GDK_TYPE_PIXBUF, NULL); Then all the construct properties use their default values. This means that both "pixels" and "pixel-bytes" get passed as NULL to gdk_pixbuf_set_property(). Later, trying to get the property for "pixel-bytes" would assert, incorrectly, because it was trying to create a GBytes from a NULL pixels storage. This commit adds a test for that construction case, and tests for constructing with g_object_new() in general. Fixes https://gitlab.gnome.org/GNOME/gdk-pixbuf/issues/91
* Documentation fixes for read_pixels() and read_pixels_bytes()Emmanuele Bassi2018-08-221-4/+11
| | | | | | | | | The read_pixels() method is missing a `Returns` stanza. The read_pixels_bytes() method is missing a description. Both functions do the same thing, so they should be documented similarly.
* Coding style fixupsFederico Mena Quintero2018-07-011-7/+7
|
* GdkPixbuf: Formalize the difference between pixels/bytes storageFederico Mena Quintero2018-06-011-28/+105
| | | | | | | | | | Instead of checking the bytes vs. pixels fields all over the place, we introduce an enum that says which mode the pixbuf is in. We have a central downgrade_to_pixels() function to turn the pixbuf from immutable to mutable. This commit only does the gdk-pixbuf core; we'll deal with pixdata and the loaders separately.
* Fix introspection data for gdk_pixbuf_new, gdk_pixbuf_copy and ↵Iñaki García Etxebarria2018-04-251-2/+2
| | | | | | gdk_pixbuf_composite_color_simple https://bugzilla.gnome.org/show_bug.cgi?id=789935
* Plug a memory leak when using GBytesVitaly Kirsanov2018-04-251-0/+2
| | | | | | | Calling g_bytes_unref_to_data() will copy the contents of the bytes buffer, so we need to free the data. https://bugzilla.gnome.org/show_bug.cgi?id=787626
* docs: Fix link to "Image data" section in API docsBastien Nocera2017-12-041-2/+2
| | | | | | Reference links use "[title][id]" not "[title](id)", that's for URLs. https://bugzilla.gnome.org/show_bug.cgi?id=765282
* Include the generated marshallers headerEmmanuele Bassi2017-08-011-1/+1
| | | | | Do not include the source, otherwise we're going to compile symbols twice.
* gdk-pixbuf: Add gdk_pixbuf_calculate_rowstride()Bastien Nocera2017-07-281-13/+46
| | | | | | To calculate the rowstride without allocating memory! https://bugzilla.gnome.org/show_bug.cgi?id=765094
* gdk-pixbuf: Tighten rowstride overflow checkBastien Nocera2017-07-271-2/+2
| | | | | | | | | The rowstride is stored as an int, and is an int in the public API. Making it an unsigned int for those calculations would increase the limit, which would obviously cause problems when the calculated value ends up between G_MAXUINT and G_MAXINT in the positives. https://bugzilla.gnome.org/show_bug.cgi?id=765094
* jpeg: Add support for JPEG_COM EXIF tagPawel Piatek2017-03-151-0/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=143608
* gdk-pixbuf: Fix overflow check in gdk_pixbuf_new()Philip Withnall2017-02-071-5/+6
| | | | | | | | | | | | | | | The recommended way to do an overflow check is to check against the limit you have in mind, rather than doing the calculation and seeing if it failed. Fix this by rearranging the check: move the variables we control (or have previously checked) over to one side, leaving the unknown variable on its own on the left-hand side. This ensures the overflow check doesn’t overflow itself. Coverity ID: 1388538 https://bugzilla.gnome.org/show_bug.cgi?id=777315
* Avoid undefined behaviorDhiru Kholia2016-09-121-3/+3
| | | | | | | | Doing overflow checks with signed integers invokes undefined behavior and induces modern compilers to omit the checks altogether. Avoid this by doing the overflow check with unsigned integers. https://bugzilla.gnome.org/show_bug.cgi?id=770986
* gdk-pixbuf: Mention copy_options() in copy()Bastien Nocera2016-08-021-1/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=768043
* gdk-pixbuf: Add gdk_pixbuf_remove_option() helperBastien Nocera2016-08-021-0/+66
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=768043
* gdk-pixbuf: Add gdk_pixbuf_copy_options() helperBastien Nocera2016-08-021-0/+40
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=768043
* Avoid redundant property notificationMatthias Clasen2016-05-041-0/+18
| | | | | We were emitting ::notify even for properties which have only one possible value.
* lib: Make gdk_pixbuf_fill() fail if pixbuf doesn't have storageBastien Nocera2014-10-241-0/+1
| | | | | | | This fixes a crash when using Python's "new" keyword instead of the constructors exported by GdkPixbuf. See https://bugzilla.gnome.org/show_bug.cgi?id=658702
* 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-1/+3
| | | | | Use glib's i18n support rather than copy pasting it. Note that gdk_pixbuf_gettext() is kept as it's an exported symbol.
* lib: Replace P_() by _()Bastien Nocera2014-10-241-18/+18
| | | | As they're defined to the same thing anyway.
* Add PNG image density metadata supportRobert Ancell2014-10-221-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=466372
* Add JPEG image density metadata supportRobert Ancell2014-10-221-0/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=701622
* lib: Add more g-i metadata for gdk_pixbuf_get_optionsRico Tzschichholz2014-10-221-1/+1
|
* doc: Fix gtk-doc warningBastien Nocera2014-10-211-3/+1
| | | | | | gdk-pixbuf.c:663: Warning: GdkPixbuf: GObject-Introspection specific GTK-Doc tag "Rename to" has been deprecated, please use annotations on the identifier instead.
* lib: Add gdk_pixbuf_get_options() helperBastien Nocera2014-10-211-0/+36
| | | | | | | So people don't have to guess the possible values of "key" in gdk_pixbuf_get_option() calls https://bugzilla.gnome.org/show_bug.cgi?id=674858
* doc: Update supported optionsBastien Nocera2014-10-211-1/+2
| | | | | Document the "multipage" option added in commit 09b3fc03284ac4f9a4f466ba908f9cd7309b2ced
* Add gdk_pixbuf_read_pixel_bytes()Colin Walters2014-07-181-0/+24
| | | | | | | | This can be convenient for language bindings to access the readonly data in a form that includes length, and also avoids a copy (for readonly pixbufs). https://bugzilla.gnome.org/show_bug.cgi?id=732297
* Add _new_from_bytes() and _read_pixels() API, handle read-only pixbufsColin Walters2014-07-181-27/+89
| | | | | | | | | | | | | | | | | | | | | 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
* Drop markup from doc commentsMatthias Clasen2014-02-151-21/+14
| | | | | 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
|
* Use g_try_malloc_n where it makes senseMatthias Clasen2013-12-181-7/+2
| | | | This lets us avoid some manual overflow checks.
* Fix GIcon implementationRyan Lortie2013-04-211-2/+102
| | | | | | | | | | | | | | | The "new rules" for GIcon say that we must support serialisation via g_icon_serialize() and loadability via GLoadableIcon, so implement both of those. Serialise GdkPixbuf by emitting a GVariant that will result in a png-encoded GBytesIcon when deserialized. The GLoadableIcon interface is similar: we return a stream that will read out as a png. Test the serialisation by round-tripping an image through this process and ensuring that it is pixel-perfect. https://bugzilla.gnome.org/show_bug.cgi?id=688820
* Documentation fixesMatthias Clasen2012-09-031-1/+1
| | | | | Patch by Rafał Mużyło, https://bugzilla.gnome.org/show_bug.cgi?id=676430
* Various annotation fixesMatthias Clasen2011-12-161-3/+3
| | | | Reported by Evan Nemerson in bug 659888.
* Add Since tagsMatthias Clasen2011-12-161-2/+4
|
* Add Since tagMatthias Clasen2011-12-161-1/+3
|
* gdk-pixbuf: Add new gdk_pixbuf_get_pixels_with_length method for gi usersJasper St. Pierre2011-12-161-2/+44
| | | | | | | | Binary data needs an explicit length to be useful. Add a new API for getting length of binary data, and allow gi users to use "get_pixels" in a useful manner instead of just grabbing the first pixel. https://bugzilla.gnome.org/show_bug.cgi?id=662009
* all: Use "const" instead G_CONST_RETURNJavier Jardón2011-06-091-1/+1
|
* Documentation: Migrate from old tmpl files.Jon Nordby2011-03-061-0/+71
| | | | | | | 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
* Fix gcc warnings about function castsBenjamin Otte2011-02-111-2/+2
|
* gdk-pixbuf: implement the GIcon interfaceCosimo Cecchi2010-11-051-2/+12
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=634059
* 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.
* Bring back deprecated apiMatthias Clasen2010-06-271-0/+33
| | | | Grudgingly, in the name of api stability.