summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/gdk-pixbuf-loader.c
Commit message (Collapse)AuthorAgeFilesLines
* docs: Update pixbuf-loader styleebassi/gi-docgenEmmanuele Bassi2021-03-211-79/+89
|
* docs: Port to the gi-docgen syntax and styleEmmanuele Bassi2021-03-211-41/+42
| | | | | Drop the gtk-doc SECTION markers, and move documentation to classes or separate documents.
* loader: Expose the dimensions of the original imageDebarshi Ray2018-05-011-1/+25
| | | | | | | | | | | | | | | | Currently, it's not possible to get the dimensions of the original image from a scaled GdkPixbuf. This is problematic for thumbnailers because they want to embed the original dimensions into the resulting thumbnail file. The only way to get this information is to either decode the full-resolution image and then downscale it, even when the decoder supports downscaling on-the-fly; or to re-implement large chunks of code to avoid decoding the full-resolution image and retain the original dimensions. Exposing the original dimensions as options simplifies the thumbnailer without affecting performance. https://bugzilla.gnome.org/show_bug.cgi?id=778517
* Use Unicode in translatable stringsPiotr Drąg2017-12-051-3/+3
| | | | | | See https://developer.gnome.org/hig/stable/typography.html https://bugzilla.gnome.org/show_bug.cgi?id=772216
* gdk-pixbuf-loader: Fix up previous commit 2634506cPhilip Withnall2017-02-071-1/+1
| | | | | | | The assertion needs to be the target of an implication (count > 0), as it could legitimately be false if (count == 0). https://bugzilla.gnome.org/show_bug.cgi?id=776990
* gdk-pixbuf-loader: Add a missing NULL checkPhilip Withnall2017-02-071-1/+4
| | | | | | | | | | | | | | The code just above checks whether image_module is NULL, and it doesn’t look like it can change in the meantime, so we should also check before dereferencing it for load_increment. Make this an assertion; although we’re not entirely sure how this code was originally supposed to work, we’re still in development, so we can investigate any assertion failures with impunity. Coverity CID: 1388529 https://bugzilla.gnome.org/show_bug.cgi?id=776990
* docs: Fix typo in the gtk-doc commentsBastien Nocera2015-09-261-1/+1
|
* Avoid a possible divide-by-zeroSarita Rawat2015-06-061-1/+1
| | | | | | Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=750440
* lib: Remove incorrect info about area-prepared signalBastien Nocera2014-10-221-4/+2
| | | | | | | | | | | | | | | It is not safe to fill the pixbuf returned from area-prepared with a background colour as a number of loaders (notably XPM and SVG) will only have information about the size and characteristics of the image after it's been fully loaded. Filling the background colour would then overwrite the image we just loaded. Given that this won't work properly with anything but 100% transparent or 100% solid pixels, remove that advice from the docs. Instead, applications should rely on their toolkits to composite over a background colour. https://bugzilla.gnome.org/show_bug.cgi?id=589334
* Add some missing nullability annotations.Evan Nemerson2014-05-161-2/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=730161
* Drop markup from doc commentsMatthias Clasen2014-02-151-36/+25
| | | | | 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
|
* Avoid a discrepancy in file recognitionMatthias Clasen2013-12-191-1/+18
| | | | | | | | | | We are using a loader to implement some of the APIs that are taking a filename, such as gdk_pixbuf_new_from_file_at_scale. But the loader does not have the filename, so it can't use it when determining the image type. This makes a difference for types such as xbm, which have no good magic in the mime database. Fix this by introducing a private API that lets us pass the filename on to the loader.
* Make scaling of xpms work againMatthias Clasen2013-12-181-1/+3
| | | | | | | | | | | | | | Commit c62676a284 had an unintended side-effect for loaders which omit to call size_func, the new size set by gdk_pixbuf_loader_set_size would overwrite the original pixbuf size, and in effect force a scale factor of 1.0. The xpm loader is one of the few which omit the size_func call, thus the regression that calling gdk_pixbuf_new_from_file_at_scale does not scale xpms anymore. The fix is to use separate variables to pass the dimensions when calling the size_func on behalf of the loader. https://bugzilla.gnome.org/show_bug.cgi?id=686514
* Unify sniff buffer sizeMatthias Clasen2013-12-171-6/+4
| | | | | | | GdkPixbufLoader was using 1k as a buffer size for sniffing file types, and the gdk_pixbuf_new_from_file() family of functions was using 4k, for no good reason. Unify this so we use the same buffer size everywhere.
* loader: Add gdk_pixbuf_loader_write_bytes()Emmanuele Bassi2013-03-301-0/+36
| | | | | | | | A GBytes variant to gdk_pixbuf_loader_write(), which allows language bindings to actually be able to use the Gio GInputStream.read_bytes() method with GdkPixbufLoader. https://bugzilla.gnome.org/show_bug.cgi?id=696917
* Remove locking around thread-unsafe modulesMatthias Clasen2013-01-101-12/+0
| | | | | | | It did not work, and was causing deadlocks. With pango becoming thread-safe this cycle, the last relevant non-threadsafe loader, svg, will be fixed. https://bugzilla.gnome.org/show_bug.cgi?id=473862
* Try to use animation size in the loader for animations.Xabier Rodriguez Calvar2012-07-301-7/+9
| | | | | | | Pixbuf size can be innacurate for some animations with frames of different sizes. Fixes: NB#613595
* Various annotation fixesMatthias Clasen2011-12-161-2/+2
| | | | Reported by Evan Nemerson in bug 659888.
* [gi] add annotation so buf is seen as an array in pixbuf_loader_writeJohn (J5) Palmieri2011-03-071-1/+1
|
* Documentation: Migrate from old tmpl files.Jon Nordby2011-03-061-0/+63
| | | | | | | 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-2/+2
|
* Improve the gdk_pixbuf_loader_close() docsXabier Rodriguez Calvar2010-08-091-0/+3
| | | | ...by mentioning that you still need to unref. Bug 604284.
* 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/+0
|
* Added an extra validation in gdk_pixbuf_loader_set_size()Javier Jardón2010-05-041-1/+5
| | | | Fixes https://bugzilla.gnome.org/show_bug.cgi?id=380196
* [annotations] Add allow-noneJohan Dahlin2010-02-191-3/+3
| | | | | | | | This commit was created using a script that searched for all docstrings containing a parameter and the string 'or %NULL'. Gdk backends and demos excluded as they are not part of a public API https://bugzilla.gnome.org/show_bug.cgi?id=610474
* Bug 561186 – GdkPixbuf API type checking needs cleanupChristian Dywan2008-11-301-5/+0
| | | | | | | | | | | | | | | | | | | 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
* Bug 517233 – Calling gdk_pixbuf_loader_close causes "GError set over theMatthias Clasen2008-09-071-2/+6
| | | | | | | | | | | | | 2008-09-06 Matthias Clasen <mclasen@redhat.com> Bug 517233 – Calling gdk_pixbuf_loader_close causes "GError set over the top of a previous GError" warning * gdk-pixbuf-loader.c (gdk_pixbuf_loader_close): Don't overwrite errors. Reported by Andrey Tsyvarev svn path=/trunk/; revision=21309
* Fix a deadlock in pixbuf loader initializationMatthias Clasen2008-09-051-3/+2
| | | | svn path=/trunk/; revision=21295
* use canonical signal names.Sven Neumann2008-08-111-8/+8
| | | | | | | | | 2008-08-11 Sven Neumann <sven@gimp.org> * gdk-pixbuf/gdk-pixbuf-loader.c: use canonical signal names. svn path=/trunk/; revision=21072
* 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
* cast the return value of _gdk_pixbuf_scaled_anim_new() to fix incompatibleMichael Natterer2008-01-141-2/+2
| | | | | | | | | | | 2008-01-14 Michael Natterer <mitch@imendio.com> * gdk-pixbuf-loader.c (gdk_pixbuf_loader_prepare): cast the return value of _gdk_pixbuf_scaled_anim_new() to fix incompatible pointer warning. svn path=/trunk/; revision=19364
* Try again to make gdk_pixbuf_get_file_info work for tiff imagesMatthias Clasen2007-07-051-2/+6
| | | | svn path=/trunk/; revision=18384
* Be more careful when calling g_propagate_error(). (#453365, MichaelMatthias Clasen2007-07-031-1/+1
| | | | | | | | | | | | 2007-07-03 Matthias Clasen <mclasen@redhat.com> * gdk-pixbuf-loader.c (gdk_pixbuf_loader_close): Be more careful when calling g_propagate_error(). (#453365, Michael Chudobiak) svn path=/trunk/; revision=18357
* Implement scaling for animationsMatthias Clasen2007-03-081-15/+11
| | | | svn path=/trunk/; revision=17430
* Protect against stop_load begin broken. (#403255, Lucas Mazzardo Veloso)Matthias Clasen2007-02-061-1/+3
| | | | | | | | | | | 2007-02-06 Matthias Clasen <mclasen@redhat.com> * gdk-pixbuf-loader.c (gdk_pixbuf_loader_close): Protect against stop_load begin broken. (#403255, Lucas Mazzardo Veloso) svn path=/trunk/; revision=17267
* Fix memory leaks in error pathsMatthias Clasen2007-01-171-10/+1
| | | | svn path=/trunk/; revision=17165
* Emit the closed signal when closing the loader, pointed out by DavidMatthias Clasen2006-12-221-0/+2
| | | | | | | | 2006-12-21 Matthias Clasen <mclasen@redhat.com> * gdk-pixbuf-loader.c (gdk_pixbuf_loader_write): Emit the closed signal when closing the loader, pointed out by David Necas.
* Don't spew a warning if the printer is already closed.Matthias Clasen2006-12-191-2/+2
| | | | | | | 2006-12-19 Matthias Clasen <mclasen@redhat.com> * gdk-pixbuf-loader.c (gdk_pixbuf_loader_close): Don't spew a warning if the printer is already closed.
* Behave as documented and close the loader when returning FALSE.Matthias Clasen2006-12-101-11/+17
| | | | | | | 2006-12-09 Matthias Clasen <mclasen@redhat.com> * gdk-pixbuf-loader.c (gdk_pixbuf_loader_write): Behave as documented and close the loader when returning FALSE.
* Put the code to protect against broken loaders that forget to set error inMatthias Clasen2006-07-171-32/+32
| | | | | | | | | | | 2006-07-16 Matthias Clasen <mclasen@redhat.com> * gdk-pixbuf-loader.c (gdk_pixbuf_loader_load_module) (gdk_pixbuf_loader_write, gdk_pixbuf_loader_close) (gdk_pixbuf_loader_ensure_error): Put the code to protect against broken loaders that forget to set error in an auxiliary function and call it in more places. (#346428, Catmur)
* More of the sameMatthias Clasen2006-05-141-1/+1
|
* Use G_DEFINE_TYPEMatthias Clasen2006-04-041-43/+3
|
* Remove a pointless check, pointed out by Kjartan Maraas.Matthias Clasen2006-03-241-1/+0
| | | | | | | 2006-03-24 Matthias Clasen <mclasen@redhat.com> * gdk-pixbuf-loader.c (gdk_pixbuf_loader_write): Remove a pointless check, pointed out by Kjartan Maraas.
* Add some documentation about supported image formats, and how to find outMatthias Clasen2006-03-221-0/+13
| | | | | | | | 2006-03-22 Matthias Clasen <mclasen@redhat.com> * gdk-pixbuf-loader.c: Add some documentation about supported image formats, and how to find out about them. (#335536, Murray Cumming)
* Only call gdk_pixbuf_loader_eat_header_write() when count > 0. (#318589,Matthias Clasen2005-10-121-2/+4
| | | | | | | | 2005-10-12 Matthias Clasen <mclasen@redhat.com> * gdk-pixbuf-loader.c (gdk_pixbuf_loader_write): Only call gdk_pixbuf_loader_eat_header_write() when count > 0. (#318589, Bogdan Nicula)
* Use a 1k buffer for sniffing image formats, instead of 128 or 256 bytes.Matthias Clasen2005-10-031-1/+1
| | | | | | | | | | 2005-10-03 Matthias Clasen <mclasen@redhat.com> * gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file): * gdk-pixbuf-io.c (gdk_pixbuf_new_from_file): * gdk-pixbuf-loader.c: Use a 1k buffer for sniffing image formats, instead of 128 or 256 bytes. (#317225, Sebastien Bacher, Dom Lachowicz)
* Intern type names before registering the type to avoid unnecessary copies.Matthias Clasen2005-08-311-1/+1
| | | | | | | | | | | | | | 2005-08-31 Matthias Clasen <mclasen@redhat.com> * io-ani-animation.c (gdk_pixbuf_ani_anim_iter_get_type) (gdk_pixbuf_ani_anim_get_type): * io-gif-animation.c (gdk_pixbuf_gif_anim_get_type) (gdk_pixbuf_gif_anim_iter_get_type): * gdk-pixbuf-loader.c (gdk_pixbuf_loader_get_type): * gdk-pixbuf.c (gdk_pixbuf_get_type): * gdk-pixbuf-animation.c (gdk_pixbuf_animation_get_type): Intern type names before registering the type to avoid unnecessary copies.
* Make PLT-reduction work with gcc4, and don't include everything inMatthias Clasen2005-03-141-2/+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.