summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/gdk-pixbuf-io.c
Commit message (Collapse)AuthorAgeFilesLines
* gdk-pixbuf/gdk-pixbuf-io.c: fix build without gmoduleFabrice Fontaine2021-02-091-0/+2
| | | | | | | | | | | | | | | Fix the following build failure: ../gdk-pixbuf/gdk-pixbuf-io.c: In function 'gdk_pixbuf_io_init': ../gdk-pixbuf/gdk-pixbuf-io.c:681:16: error: implicit declaration of function 'gdk_pixbuf_get_module_file'; did you mean '_gdk_pixbuf_get_module'? [-Werror=implicit-function-declaration] 681 | module_file = gdk_pixbuf_get_module_file (); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | _gdk_pixbuf_get_module Fixes: - http://autobuild.buildroot.org/results/6cd54c497f5d19342ec94ece713547b887e4c02d Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
* io: Initialize variable before reading into itEmmanuele Bassi2020-11-101-5/+4
| | | | We must handle the error path, where the out argument isn't set.
* Remove the libjasper-based JPEG2000 loaderEmmanuele Bassi2020-06-261-7/+0
| | | | | | | | | | | | | | | | | Libjasper is not really maintained any more, and has been dropped by various Linux distributions over the years. GdkPixbuf has not enabled the JPEG2000 loader by default in many years, relying on downstream distributors to do so if they also shipped libjasper. This means that it's unlikely anybody has relied on GdkPixbuf to load a JPEG2000 image for the past 3 to 5 years, if at all. The only other option for loading JPEG2000 images is to use OpenJPEG, and for that there is an out of tree GdkPixbuf module available: https://notabug.org/necklace/jp2-pixbuf-loader Fixes: #152, #137
* Never pass NULL for the size_func and updated_func of module->begin_load()Federico Mena Quintero2020-01-071-1/+18
| | | | This will let us avoid NULL checks in the individual modules.
* docs: Add missing argumentEmmanuele Bassi2019-08-141-0/+1
|
* core: Always initialise default pixbuf loadersBastien Nocera2019-03-051-7/+21
| | | | | | | | | | | | | | The "run once" initialisation of pixbuf modules shipped with gdk-pixbuf itself would be skipped if an application was successfully calling gdk_pixbuf_init_modules() first, as this would set the internal list of file_formats to be non-NULL, and skip any initialisation of those modules. This fix makes sure that pixbuf modules shipped with gdk-pixbuf are always initialised, regardless of whether gdk_pixbuf_init_modules() successfully initialised an application provided one. Fixes: fd1376b799e411f983ab6faa00b066a8007ad9a1
* core: Add gdk_pixbuf_init_modules() for applicationsBastien Nocera2019-02-281-0/+34
| | | | | | | | gdk_pixbuf_init_modules() should be used by applications which want to have gdk-pixbuf loader modules install in a separate path, usually in the application's library directory. https://bugzilla.gnome.org/show_bug.cgi?id=786035
* core: Pass module_file path as an argumentBastien Nocera2019-02-281-17/+22
| | | | | | | This should allow applications to install gdk-pixbuf modules in a separate directory from the system location. https://bugzilla.gnome.org/show_bug.cgi?id=786035
* core: Split off the initialisation sectionsBastien Nocera2019-02-281-71/+81
| | | | | | | Separate the builtin loaders setup from the external loaders initialisation from the loaders.cache file. https://bugzilla.gnome.org/show_bug.cgi?id=786035
* Avoid a compiler warningEmmanuele Bassi2018-04-291-13/+7
| | | | | | | | If there are no built-in modules, the `builtin_module` variable is not used, and the compiler will warn about it. Since we're already using the variable inside a macro, we can just declare it inside the macro block and save us the trouble altogether.
* windows: rework loaders cache relocation supportChristoph Reiter2018-04-241-28/+15
| | | | | | | | | | | | | | | | | | | | | | | | Relocation works by recognizing paths in the loaders cache which start with the built time prefix and extract the relative path from that. This leads to the following problem when updating the cache: In case the package is build on another machine one has to either match the build directory layout or adjust the cache by hand for the resulting cache to stay relocatable. This commonly occurs with msys2 where mostly pre-build packages are used which are built on another machine and the cache gets generated at install time. Another case is updating the cache in a separate deployment environment. This patch takes the package installation directory as a base and writes relative paths into the cache when relocation is enabled. When loading the cache a relative path is made absolute by prepending the package base again. https://bugzilla.gnome.org/show_bug.cgi?id=776081
* introspection: Add missing filename type annotationsChristoph Reiter2018-01-081-10/+13
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=767267
* gdk-pixbuf-io: Simplify codeUmang Jain2017-12-301-12/+9
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=790584
* Fix up gdk_pixbuf_new_from_stream_async()Benjamin Otte2017-12-081-7/+5
| | | | | | | | | | Add fixes for the various issues brought up in https://bugzilla.gnome.org/show_bug.cgi?id=790584 * g_task_propagate_pointer() is transfer full * GBytes get leaked * always pass the stream as task source object to avoid criticals * don't check the source object in finish()
* Use Unicode in translatable stringsPiotr Drąg2017-12-051-12/+12
| | | | | | See https://developer.gnome.org/hig/stable/typography.html https://bugzilla.gnome.org/show_bug.cgi?id=772216
* io: Only ref pixbuf if it is not NULLBenjamin Otte2017-11-201-1/+5
|
* gdk-pixbuf-io: Implement async loading without threadsBenjamin Otte2017-11-201-31/+74
| | | | | | | The new GTK4 clipboard input streams don't like threads very much. So don't use them. https://bugzilla.gnome.org/show_bug.cgi?id=790584
* io: Fix GError leak in gdk_pixbuf_new_from_stream()Robert Ancell2017-07-271-19/+10
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=783538
* gdk-pixbuf-io: Check length before checking for pixdata magicBastien Nocera2017-07-121-0/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=784583
* gdk-pixbuf-io: Remove unused flags variableBastien Nocera2017-07-121-2/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=784583
* gdk-pixbuf-io: Add precondition checks for image dimensionsPhilip Withnall2017-02-071-1/+14
| | | | | | | | | | | | | Refuse to save an invalid GdkPixbuf: one which has negative width, height or number of channels. This allows us to put assertions for all those properties in the I/O code, which helps static analysis not go off on one because it thinks the image width could be negative. Coverity ID: 1388534 https://bugzilla.gnome.org/show_bug.cgi?id=777374
* io: Fix typo in documentation ( "the the" -> "the" )vrishab2016-12-281-5/+5
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=776457
* io: Fix incorrect documentationvrishab2016-12-281-3/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=776457
* io: Also handle compressed GdkPixdata when loading from GResourcesBastien Nocera2016-12-191-6/+5
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=776105
* pixdata: Remove pixdata loaderBastien Nocera2016-12-131-6/+0
| | | | | | | | | | | This won't stop pixdata-encoded data from being mmap'ed directly from the binary when using GResource, but will stop external files from being loaded, and thus block a possible attack vector. This also adjusts the new pixdata tests to make sure that external pixdata files fail to load. https://bugzilla.gnome.org/show_bug.cgi?id=776004
* windows: Remove old codepage ABI compat codeChristoph Reiter2016-11-071-126/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (and as a side effect make the gi bindings API compatible with other platforms) The compat code was added in https://git.gnome.org/browse/gdk-pixbuf/commit/?id=141506eb46927eb10b74bc24727488bdbde1c7d4 to allow switching to utf-8 paths while keeping binary compatibility and to make new programs link against the "_utf8" variants. This results in two problems for gi bindings: (1) g-ir-scanner can't find the annotations due to the renames and thus gdk_pixbuf_savev() can't be used in bindings (the other functions happen to work with default annotations) (2) g-ir-scanner will write the renamed functions in the gir/typelib with the "_utf8" suffix, making the resulting bindings API incompatible with other platforms. Some months ago https://git.gnome.org/browse/gdk-pixbuf/commit/?id=6855a2d806b2305938abc04b0cb4fa383f8ccd3b got rid of symbol files, breaking ABI and old binaries. This patch removes the, now unused, codepage code and removes the renames so that new code links against the real functions again. To not break recent binaries add new functions with the _utf8 suffix which just call the main functions. Annotations are copied as well to not break bindings API. A similar change in glib was commited some years ago https://git.gnome.org/browse/glib/commit/?id=8c42a663f8182f8281c083390aa761e8e9badc63 https://bugzilla.gnome.org/show_bug.cgi?id=773760
* gdk-pixbuf: add gdk_pixbuf_format_is_save_option_supported() APICosimo Cecchi2016-08-021-0/+35
| | | | | | | This is useful when you want to set an option (e.g. icc-profile) that might be supported by different formats, but not all of them. https://bugzilla.gnome.org/show_bug.cgi?id=683371
* Drop unneeded use of deprecated GLib thread APIMatthias Clasen2016-08-021-10/+2
| | | | | Threads have always been initializes, since 2011. Time to drop this.
* Add non-varargs versions of methods to save to streamCosimo Cecchi2016-04-061-34/+115
| | | | | | | | This is useful when the set of options you want to use changes according to specific conditions, and makes the stream-based API consistent with the others. https://bugzilla.gnome.org/show_bug.cgi?id=683063
* Remove more references to dropped loadersMatthias Clasen2015-09-251-23/+1
|
* Ignore our own deprecationsMatthias Clasen2015-08-251-3/+6
|
* Build gdk_pixbuf_get_toplevel() even if !USE_GMODULEBenjamin Gilbert2015-08-231-32/+37
| | | | | | | | | a55aa6eb introduced gdk_pixbuf_get_toplevel(), which is called if GDK_PIXBUF_RELOCATABLE but is only built if USE_GMODULE && GDK_PIXBUF_RELOCATABLE. This causes build failures on MinGW and Darwin when configured with --disable-modules. https://bugzilla.gnome.org/show_bug.cgi?id=740912
* gdk-pixbuf-io: treat application/gzip like text/plainAlberts Muktupāvels2015-04-301-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=648815
* Revert "lib: Annotate var-arg gdk_pixbuf_save*()"Bastien Nocera2015-03-051-3/+3
| | | | | | This reverts commit 112eab418137df2d2f5f97e75fb48f17e7f771e7. See https://bugzilla.gnome.org/show_bug.cgi?id=670372
* io: Fix check if library is running inside build treeRobert Ancell2014-11-211-1/+1
| | | | | | | The existing check was missing the length of the string so instead of reading the end of the string it read the memory before it. https://bugzilla.gnome.org/show_bug.cgi?id=733413
* lib: Prefer our own loaders to the GDI+ oneIgnacio Casal Quinteiro2014-10-231-12/+12
| | | | | | | | Give priority to the modules using the open source libraries instead of gdip as GDI+ is known to be buggy, and not so well integrated into gdk-pixbuf. https://bugzilla.gnome.org/show_bug.cgi?id=739077
* Allow saving 1-bit mono TIFFs used in faxesMukund Sivaraman2014-10-231-3/+7
| | | | | | | | | | | | | | | | | While working on a GTK+ 3 port of Hildon, I'm upstreaming some patches from Maemo's repositories. This one is repurposed from: http://maemo.gitorious.org/hildon/gtk/commit/005de8d5 From: Christian Dywan <christian@lanedo.com> Date: Wed, 20 Jan 2010 11:22:29 +0100 Subject: [PATCH] Fixes: NB#116221 - Sharing TIF image with Size Option Large makes the image much larger than the original one when shared to OVI or Flickr. This patch combined other bits which were removed, and the code was modified a little. https://bugzilla.gnome.org/show_bug.cgi?id=578876
* io: extend support for relotations to OS X and LinuxAndoni Morales Alastruey2014-10-221-17/+41
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=737523
* lib: add gdk_pixbuf_win32_get_toplevel to the private APIAndoni Morales Alastruey2014-10-221-3/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=737523
* Add PNG image density metadata supportRobert Ancell2014-10-221-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=466372
* Add JPEG image density metadata supportRobert Ancell2014-10-221-1/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=701622
* lib: Annotate var-arg gdk_pixbuf_save*()Torsten Schönfeld2014-10-211-3/+3
| | | | | | | Annotate var-args gdk_pixbuf_save*() functions as aliases for save*v() so that the functions shadow the var-arg variants. https://bugzilla.gnome.org/show_bug.cgi?id=670372
* Add an asynchronous version of gdk_pixbuf_get_file_infoDebarshi Ray2014-08-161-0/+122
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=712599
* Add some missing nullability annotations.Evan Nemerson2014-05-161-5/+7
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=730161
* Expand docs for gdk_pixbuf_new_from_stream_at_scale()Bastien Nocera2014-04-291-5/+10
| | | | | | | The case where preserve_aspect_ratio is TRUE and both the width and height are given wasn't explicitely documented. https://bugzilla.gnome.org/show_bug.cgi?id=727848
* docs: Update directory and file names for module installationKjell Ahlstedt2014-04-231-3/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=728357
* Add annotations to gdk_pixbuf_save_to_buffer buffer argWilliam Jon McCann2014-02-211-1/+1
|
* Drop markup from doc commentsMatthias Clasen2014-02-151-44/+27
| | | | | 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
|
* Improve mime type detectionMatthias Clasen2013-12-191-1/+1
| | | | | | | | | | | | The mime database has no magic at all for xbm, and it gets sniffed as text/plain. This is a regression from when we were using our own magic, so be a little more forgiving here - treat a mimetype of 'text/plain' like uncertain results, and consult the filename. This lets us at least recognize files with the extension .xbm correctly again. https://bugzilla.gnome.org/show_bug.cgi?id=573726