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 482338 - Large JPEG as custom icon shows up as plain document icon
Large JPEG as custom icon shows up as plain document icon
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: Metadata
2.20.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-10-01 19:04 UTC by Sven Arvidsson
Modified: 2011-09-12 23:23 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20



Description Sven Arvidsson 2007-10-01 19:04:34 UTC
Setting a JPEG image as the custom icon for a directory or launcher results in Nautilus displaying the default plain document icon. This is a regression from 2.18.

This has probably something to do with size, an 800 x 600 px JPEG doesn't work, scaling it down to 40 x 40 makes it work. Note that the unscaled JPEG still works if you use it as a custom emblem. 

This message is printed on stdout:

** Message: Failed to close thumbnail pixbuf loader for /home/sa/Photos/2006/10/15/img_0902.jpg: Error interpreting JPEG image file (Application transferred too few scanlines)
Comment 1 Vitezslav Kotrla 2007-10-12 07:41:22 UTC
I've tried to find some pattern here, so I've tested bunch of images approximately the same size (600 px width, small variation in height) and tried to set them as directory icon. Images less than 156 kB were with no problem, bigger filesizes produced plain document icon instead of thumbnail.
Comment 2 David Christian Berg 2007-10-19 23:32:19 UTC
I haven't checked what you say about the image sizes, but I can confirm that with small JPGs it works and with big ones it shows a (very ugly, where is that defined, it's not in the Tango icons) icon.
Comment 3 Vitezslav Kotrla 2007-12-02 21:34:15 UTC
Off topic: I've noticed evolution 2.12.0 also displays similar issues regarding thumbnailing of "large" (> cca 200 kB) JPEGs. When you attach JPEG image, a thumbnail is shown. Smaller JPEGs are thumbnailed ok, while larger ones are broken - usually lower half of image is black (read: missing).

There seems to be something wrong with JPEG thumbnailing in Gnome 2.20 in general. Any ideas?
Comment 4 Peter Clifton 2007-12-29 02:54:33 UTC
Could this be related to:

http://bugzilla.gnome.org/show_bug.cgi?id=494667

Which has a patch (recently applied in SVN)?
Comment 5 H. Sugawara 2008-01-03 16:49:08 UTC
I applied the patch for id=494667 to gtk2 2.12 on my PC.  The almost custom icons which had the problem are displayed normally.  A few not fixed custom icons have the jpeg data which is missing trailing part.
Comment 6 Vitezslav Kotrla 2008-01-17 06:48:14 UTC
I've also tried patch for #494667, specifically gdk-pixbuf/io-jpeg.c revision 19135:

2007-12-09  Matthias Clasen  <mclasen@redhat.com>

        * io-jpeg.c: Fix the spinguard logic for big buffers.
        (#494667, Ed Catmur)

Result: Problem is gone and JPEG thumbnails are shown correctly (previously I've seen corrupted thumbnails in nautilus and evolution, both are fine now).
Comment 7 Cosimo Cecchi 2011-09-12 23:23:06 UTC
I believe this is obsolete now for GNOME 3.0. Please reopen the bug in case you still see this problem with Nautilus >= 3.0.