After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 699414 - Thumbnails for 'icns' files are not generated
Thumbnails for 'icns' files are not generated
Status: RESOLVED DUPLICATE of bug 629474
Product: gnome-desktop
Classification: Core
Component: Thumbnail
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-05-01 19:35 UTC by Rodrigo Silva
Modified: 2017-07-10 18:30 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Rodrigo Silva 2013-05-01 19:35:53 UTC
This is closely related to Bug 629474 and Bug 629474 , and GdkPixbuf and its lack of a non-incremental loader (or requirement of an incremental one) is to blame. 

But it *is* possible for libgnome-desktop to access GdkPixbuf in a different way, allowing thumbnails for icns files to be generated.

For local files it is pretty trivial: instead of (or as a fallback to) using Loaders, file info, GLib's Icon preview, GStreams, etc, simply open the file, resize it and save.

Here is a tiny (and working) example in Python:

#!/usr/bin/env python
import sys
from gi.repository import GdkPixbuf
inputname, outputname, size = sys.argv[1:]
pixbuf = GdkPixbuf.Pixbuf.new_from_file(inputname)
scaled = GdkPixbuf.Pixbuf.scale_simple(pixbuf, int(size), int(size),
                                       GdkPixbuf.InterpType.BILINEAR)
scaled.savev(outputname, 'png', [], [])

A more complete solution is available at:
https://github.com/MestreLion/icns-thumbnailer

So, if a 8-line python script can generate a thumbnail with current GdkPixbuf, with all its limitations, there's no reason for libgnome-desltop not to do so too.

Please make it happen
Cheers,
ML
Comment 1 Bastien Nocera 2017-07-10 18:30:02 UTC
> This is closely related to Bug 629474 and Bug 629474

Both of those are the same, and have been fixed for a while, closing as duplicates.

*** This bug has been marked as a duplicate of bug 629474 ***