GNOME Bugzilla – Bug 482338
Large JPEG as custom icon shows up as plain document icon
Last modified: 2011-09-12 23:23:06 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)
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.
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.
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?
Could this be related to: http://bugzilla.gnome.org/show_bug.cgi?id=494667 Which has a patch (recently applied in SVN)?
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.
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).
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.