summaryrefslogtreecommitdiff
path: root/thumbnailer
Commit message (Collapse)AuthorAgeFilesLines
* Meson: Override programsXavier Claessens2021-01-291-1/+2
| | | | | Meson's gnome module could want to find programs such as gdk-pixbuf-pixdata when invoking glib-compile-resources.
* thumbnailer: Unbreak thumbnailing of GIFsDebarshi Ray2018-12-141-0/+8
| | | | | | | | | | | | | | The GIF codec throws GDK_PIXBUF_ERROR_INCOMPLETE_ANIMATION if it's closed without decoding all the frames. The thumbnailer has always, both now with gdk_pixbuf_new_from_file_at_scale and earlier, decoded only the first animation frame, which is why this specific error needs to be ignored [1]. Fixes: dd1f222f78eed2b7d70a5e8507199c78e3f9e12b [1] https://gitlab.gnome.org/GNOME/gnome-desktop/commit/f9b2c480e38d https://gitlab.gnome.org/GNOME/gdk-pixbuf/issues/99
* Deprecate GDK_INTERP_HYPERissue-3Emmanuele Bassi2018-05-301-1/+1
| | | | | | | | | | | The hyperbolic filter has been broken for the past 12 years, and nobody is going to fix it, now, as pixel operations in GdkPixbuf have been thoroughly superseded by Cairo. The only user of GDK_INTER_HYPER in tree is the thumbnailer code, which cannot use Cairo for dependency reasons. Closes: #3
* thumbnailer: Simplify the code by reusing existing GdkPixbuf APIDebarshi Ray2018-05-011-201/+8
| | | | | | | | | | | | | Existing GdkPixbuf API like gdk_pixbuf_new_from_file_at_size and gdk_pixbuf_get_file_info have grown smarter since this code was written. They are now better at selecting the best GdkPixbufLoader for a given file. As a side-effect, this also prevents leaking the GFile and its URI, but those are minor issues since the thumbnailer has a very short life span https://bugzilla.gnome.org/show_bug.cgi?id=778517
* thumbnailer: Don't lose the dimensions of the original imageDebarshi Ray2018-05-011-5/+5
| | | | | | | | | | All the options are stored under the "gdk_pixbuf_options" key, and only those were being copied after applying the orientation. Anything else stored under any other key gets lost with the unoriented GdkPixbuf. Fallout from 06cf4c78067203b78acbfb29862350cdb8200b73 https://bugzilla.gnome.org/show_bug.cgi?id=778517
* Drop Autotools buildEmmanuele Bassi2018-04-301-35/+0
| | | | | | We use Meson, now. The Meson build has been tested for almost a year in our continuous integration pipeline, and it's functionally equivalent to the Autotools one.
* Move all aux scripts to their own directoryEmmanuele Bassi2017-08-032-44/+0
| | | | This makes it easier to find them and reference them.
* meson: Build pixbuf thumbnailerEmmanuele Bassi2017-08-022-0/+77
| | | | | We need to go through an intermediate script in order to generate the thumbnailer's desktop file.
* thumbnailer: Update skeleton to fix a possible crashBastien Nocera2017-07-271-2/+12
| | | | | | | | If the loader returns a NULL pixbuf without returning an error, the skeleton would crash trying to print the error. Print that the thumbnailer is broken instead. https://bugzilla.gnome.org/show_bug.cgi?id=778204
* thumbnailer: Fix (nearly) empty MimeTypes in thumbnailerBastien Nocera2017-02-121-5/+4
| | | | | | | | Because we weren't waiting for loaders.cache to be created to run our helper, and we weren't applying the environment variables to the correct helper, we would end up with a broken list of supported MimeTypes. https://bugzilla.gnome.org/show_bug.cgi?id=778451
* thumbnailer: Add copyright headerBastien Nocera2017-02-121-0/+21
|
* thumbnailer: Update from gnome-thumbnailer-skeleton masterPhilip Withnall2017-02-071-1/+6
| | | | | | | | | | | | | | | | | | | | https://github.com/hadess/gnome-thumbnailer-skeleton/commits/master Add some assertions to help Coverity From looking at the code, these assertions should always hold already, but it clarifies the code and helps static analysis if we add them explicitly. (n_pixels == 0) is only true if (s_x1 == s_x2 || s_y1 == s_y2), which is only true if (dx == 0 || dy == 0). This cannot be true, because dx and dy are the result of dividing source_[width|height] by dest_[width|height], and there’s already an assertion that the former are greater or equal to the latter. Coverity CID: 1388528 https://bugzilla.gnome.org/show_bug.cgi?id=776990
* thumbnailer: Update from gnome-thumbnailer-skeleton masterPhilip Withnall2017-02-071-0/+2
| | | | | | | | | | | https://github.com/hadess/gnome-thumbnailer-skeleton/commits/master Add version checks around g_type_init() call g_type_init() was deprecated (made unnecessary) in GLib 2.36.0, so don’t call it if we are compiled against a new enough version of GLib. https://bugzilla.gnome.org/show_bug.cgi?id=777315
* thumbnailer: Cleanup the cleanupsBastien Nocera2017-01-091-23/+6
| | | | | | | | | | | Commit 6afda9c removed the separate height and width arguments, as we always want to keep the original image's aspect ratio. The cleanup wasn't quite finished though, and ended up with slightly non-sensical checks (like doing comparisons twice). Coverity CID 1388524 https://bugzilla.gnome.org/show_bug.cgi?id=768062
* thumbnailer: Add $(EXEEXT) to the the gdk-pixbuf-print-mime-typesSebastian Dröge2016-12-281-1/+1
| | | | | | | Fixes the build on Windows and elsewhere, where there's a filename extension for executables https://bugzilla.gnome.org/show_bug.cgi?id=776432
* thumbnailer: Fix a potential NULL pointer dereferencePhilip Withnall2016-12-191-1/+2
| | | | | | | | | | In debug code on an error path: if the loader is not loaded due to mime_type being NULL, no error is set; so dereferencing it is a bad idea. Coverity CID 1388530 https://bugzilla.gnome.org/show_bug.cgi?id=776026
* thumbnailer: Avoid runtime warnings when file_to_pixbuf() failsBastien Nocera2016-12-121-19/+22
| | | | By updating the thumbnailer skeleton.
* thumbnailer: Avoid double-setting errorsBastien Nocera2016-12-121-5/+5
| | | | | When the image loading failed already, don't capture the error from gdk_pixbuf_loader_close() to avoid a run-time warning.
* thumbnailer: Remove unused variableBastien Nocera2016-12-121-1/+0
|
* thumbnailer: Bump chunk size to 65536Bastien Nocera2016-12-121-1/+1
| | | | | | As used in other parts of gdk-pixbuf. https://bugzilla.gnome.org/show_bug.cgi?id=768062
* thumbnail: Let the caller handle preview iconsBastien Nocera2016-12-121-28/+3
| | | | | | | | As we only get called for images, and that preview icons can also be used for other data types handled natively by external devices, let the caller handle those. https://bugzilla.gnome.org/show_bug.cgi?id=768062
* thumbnailer: Helper cleanupsBastien Nocera2016-12-121-46/+33
| | | | | | | | | Clean up _gdk_pixbuf_new_from_uri_at_scale() by: - Always preserving the aspect ratio - Using a single value for the target with/height - Returning errors https://bugzilla.gnome.org/show_bug.cgi?id=768062
* thumbnailer: Add an external thumbnailer for imagesBastien Nocera2016-12-126-0/+734
So that broken images, or images that use too much RAM can get killed without prejudice. _gdk_pixbuf_new_from_uri_at_scale() and gnome_desktop_thumbnail_scale_down_pixbuf () are directly from gnome-desktop. https://bugzilla.gnome.org/show_bug.cgi?id=768062