summaryrefslogtreecommitdiff
path: root/gdk-pixbuf
Commit message (Collapse)AuthorAgeFilesLines
* docs: Update pixbuf-loader styleebassi/gi-docgenEmmanuele Bassi2021-03-211-79/+89
|
* docs: Update pixbuf-animation styleEmmanuele Bassi2021-03-211-70/+83
|
* docs: Update pixbuf-scale styleEmmanuele Bassi2021-03-211-28/+27
|
* docs: Update pixbuf-util styleEmmanuele Bassi2021-03-211-31/+45
|
* docs: Update pixbuf-data styleEmmanuele Bassi2021-03-211-22/+38
|
* docs: Update pixdata styleEmmanuele Bassi2021-03-211-54/+63
|
* docs: Update gdk-pixbuf-io styleEmmanuele Bassi2021-03-211-272/+313
|
* docs: Clean up GdkPixbuf's core APIEmmanuele Bassi2021-03-211-70/+106
| | | | Use proper summaries; remove gtk-doc'isms; document properties.
* docs: Generate the GdkPixdata API referenceEmmanuele Bassi2021-03-212-29/+31
| | | | Different introspection file, different API reference.
* docs: Port to the gi-docgen syntax and styleEmmanuele Bassi2021-03-2112-399/+315
| | | | | Drop the gtk-doc SECTION markers, and move documentation to classes or separate documents.
* Fix inclusion guards for gdk-pixbuf-features.hEmmanuele Bassi2021-03-211-4/+4
| | | | | | | | | | | Use the idiomatic form: #ifndef __FOO_H__ #define __FOO_H__ ... #endif /* __FOO_H__ */
* docs: Fix the deprecation annotation for AlphaModeEmmanuele Bassi2021-03-211-1/+1
| | | | The syntax is "Deprecated: version: message".
* 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>
* Meson: Override programsXavier Claessens2021-01-291-0/+1
| | | | | Meson's gnome module could want to find programs such as gdk-pixbuf-pixdata when invoking glib-compile-resources.
* gif: Honor "revert to previous" behaviour on the first frame.Robert Ancell2021-01-051-8/+0
| | | | | | | | | | | | The code originally failed to load GIFs that had this set (4607c8e9) and then changed to silently ignoring it (af71489c). Reverting to the background on the first frame seems completely reasonable and is the behaviour of Firefox/Chrome. The [current GIF spec](https://www.w3.org/Graphics/GIF/spec-gif89a.txt) doesn't indicate any issue doing this and it matches what Firefox/Chrome does. Fixes https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/issues/166
* animation: silence gtk doc warningsPaolo Borelli2021-01-021-7/+6
|
* Include pixbuf loader API in the gir filePaolo Borelli2021-01-021-0/+1
|
* gif: Do all of gif_init() with a single readSimon McVittie2020-12-121-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | As documented in the introductory comment, the interface of the various functions in the GIF loader is that they read all the bytes they need, or return -1 if not enough are available. Since commit 5212d69f "gif: Replace old buffer management code with GByteArray", the incremental loader strictly depends on that assumption. Unfortunately, gif_init() didn't conform to that interface. If there were enough bytes available for the GIF signature (GIF87a or GIF89a) but not enough bytes for the screen descriptor, it would return -1 having already consumed the first 6 bytes of the stream. A subsequent retry with more data available would start from the beginning of the screen descriptor, and immediately raise an error because the screen descriptor is extremely unlikely to start with another copy of the "GIF8" magic number. The regression test tests/pixbuf-short-gif-write.c would have detected this, but was accidentally disabled by commit 7f0b214a "tests: Conditionally build and run tests". This seems most easily fixed by reading the whole of the 13-byte fixed-length header in one go. Adjust the offsets into the buffer used to parse the screen descriptor accordingly. Signed-off-by: Simon McVittie <smcv@debian.org>
* Make enum GType registration thread safeEmmanuele Bassi2020-12-071-4/+6
| | | | | Use g_once_init_enter/leave to ensure that enumeration types can be registered across threads.
* gif: Fix LZW decoder accepting invalid LZW code.Robert Ancell2020-12-081-6/+7
| | | | | | | | | The code value after a reset wasn't being validated, which means we would accept invalid codes. This could cause an infinite loop in the decoder. Fixes CVE-2020-29385 Fixes https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/issues/164
* gif: Fix GIF images without a Graphic Control Extension rendering colour 0 ↵Robert Ancell2020-11-231-0/+1
| | | | | | | | as the background. This was a regression introduced in 5212d69f2362f9b68ccf9385277e5c4a744b2187. Fixes https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/issues/162
* 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.
* xbm: Free data in error pathEmmanuele Bassi2020-11-101-4/+5
|
* png: Clean up PNG savingstatic-analysisEmmanuele Bassi2020-11-101-271/+263
| | | | | Iterate over the key/value arrays once, using GArray to store the text chunks after validating the keys.
* gif: Replace old buffer management code with GByteArrayRobert Ancell2020-11-091-108/+13
|
* Merge branch 'gif-colormap-bug' into 'master'Emmanuele Bassi2020-11-091-3/+1
|\ | | | | | | | | | | | | gif: Fix bug where the local colormap is not dropped. Closes #156 See merge request GNOME/gdk-pixbuf!79
| * gif: Fix bug where the local colormap is not dropped.Robert Ancell2020-11-091-3/+1
| | | | | | | | | | | | | | | | | | | | This was seen in a GIF file that had a local colormap set on frame 6, but not on frame 7. Instead of reverting to the global colormap we continued to render with the last local colormap. This was a regression introduced in 4e7b5345d2fc8f0d1dee93d8ba9ab805bc95d42f. Fixes https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/issues/156
* | gif: Remove unnecessary structureRobert Ancell2020-11-091-23/+16
| |
* | gif: Remove unused variablesRobert Ancell2020-11-091-11/+2
|/
* PNM: Generate an error if no pixbuf could be producedFelix Riemann2020-11-091-0/+6
| | | | | | | | This is expected by the loader API which trips over an assertion otherwise. Partially loaded images still work while images that are too truncated fail gracefully. Fixes #111.
* meson: Change introspection option to feature typeXavier Claessens2020-10-161-1/+3
| | | | This is more consistent with other modules like GTK.
* Remove the libjasper-based JPEG2000 loaderEmmanuele Bassi2020-06-263-352/+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
* pixops: Avoid division during alpha scalingJan Ziak2020-06-261-9/+28
| | | | | | | | | | | This patch significantly improves performance of gtksourceview-2.10.5 full-screen redraw on a 4K display with an alpha channel. Divisions by the common value 0xff0000 are converted into multiplications by an optimizing C compiler. For other values, 3 divisions are reduced to 1 division, 3 multiplications and some float-to-int conversions.
* docs: Move the core data section to the source fileEmmanuele Bassi2020-06-262-69/+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.
* XPM: Fix undefined behaviourTobias Stoeckmann2020-06-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Pixel data in XPM files consists of color characters. XPM allows up to 31 characters per pixel (cpp). If the file defines a width larger than G_MAXINT / cpp, the calculated memory required to parse a single line (wbytes) leads to a signed integer overflow. On common systems, a signed integer overflow works as expected on a bit level. Properly crafted files can overflow the variable wbytes in a way that it is positive again, which leads to a "successful" parsing of the XPM file. The pixel values itself are not assigned by gdk-pixbuf code, therefore leaking raw memory returned by malloc. This might leak sensitive information through pixel values, depending on the actual application. Proof of Concept: /* XPM */ static char * poc_xpm[] = { "138547333 1 1 31", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx c None", "---------------------------"};
* XBM: Fix signed integer overflow.Tobias Stoeckmann2020-06-261-2/+2
| | | | | | | | | | | | | | | | Parsing an XBM file with pixel bits larger than int leads to undefined behavior (signed integer overflow). Since only the lowest 8 bits are used, this patched code produces the same images as before. Also do not increment gotone but set it to a value. If more than INT_MAX values are parsed, this int would overflow as well. Proof of Concept (compile with -fsanitize=undefined or -ftrapv): static unsigned char poc_bits[] = { 0xFFFFFFFF };
* io-bmp.c: Fix building on older compilersChun-wei Fan2020-06-241-1/+3
| | | | | Avoid declaring variables in a for loop initialization so that the code continues to build on older compilers.
* GIF: Plug animation data and iterator leakSebastian Keller2020-04-021-1/+5
| | | | | | The get_static_image() method for gifs is leaking an iterator and since the iterator has a reference to the animation, this results in all animation frames being leaked.
* Check the memset length argumentEmmanuele Bassi2020-04-021-1/+5
| | | | | | Avoid overflows by using the checked multiplication macro for gsize. Fixes: #132
* pixdata: Bail out if the error is setEmmanuele Bassi2020-04-021-1/+6
| | | | | We might still get a GdkPixbuf even if the GError is set, which leads to us reusing the GError instance later on.
* JPEG: skip bytes during incremental loadNathan Lee2020-04-021-17/+16
| | | | | | | Previously only skipped bytes at the start of incremental loads. During a incremental load, there may be bytes to skip between reloads. Previous behavior misread metadata sometimes. Fixes #70
* loaders: Make the names of prepared_func and updated_func consistentFederico Mena Quintero2020-01-077-101/+101
| | | | | | | | | They were prepare_func/prepared_func, and update_func/updated_func in various places. Since their corresponding type names are GdkPixbufModulePreparedFunc and GdkPixbufModuleUpdatedFunc, make all the fields be called prepared_func and updated_func to make them easier to grep.
* JPEG: assert and assume that the module callbacks are non-NULLFederico Mena Quintero2020-01-071-21/+21
|
* GIF: assert and assume that the module callbacks are non-NULLFederico Mena Quintero2020-01-071-31/+66
|
* QTIF: assert and assume that the module callbacks are non-NULLFederico Mena Quintero2020-01-071-36/+22
|
* ICO: assert and assume that the module callbacks are non-NULLFederico Mena Quintero2020-01-071-8/+10
|
* gdip-utils: assert and assume that the module callbacks are non-NULLFederico Mena Quintero2020-01-071-8/+10
|
* XPM: assert and assume that the module callbacks are non-NULLFederico Mena Quintero2020-01-071-10/+12
|
* Jasper: assert and assume that the module callbacks are non-NULLFederico Mena Quintero2020-01-071-13/+14
|
* PNG: assert and assume that the module callbacks are non-NULLFederico Mena Quintero2020-01-071-5/+7
|