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 652498 - Cannot read .ico file from n900 disk
Cannot read .ico file from n900 disk
Status: RESOLVED FIXED
Product: gdk-pixbuf
Classification: Platform
Component: general
2.23.x
Other Linux
: Normal minor
: ---
Assigned To: gdk-pixbuf-maint
gdk-pixbuf-maint
: 660415 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-06-13 20:34 UTC by Sean Young
Modified: 2011-12-19 08:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ico: Skip compressed icon images (7.71 KB, patch)
2011-09-29 20:01 UTC, Stef Walter
none Details | Review
ico: Skip compressed icon images (7.71 KB, patch)
2011-12-16 20:36 UTC, Matthias Clasen
committed Details | Review

Description Sean Young 2011-06-13 20:34:31 UTC
The Nokia N900 mass storage comes with an autorun.inf:

[autorun]
icon=.n900.ico

And a file called .n900.ico. However this icon is not displayed correctly in gnome. "eog .n900.ico" says "invalid header" even though gimp and firefox load the file correctly.

Here is a copy:

http://www.msxnet.org/n900.ico

Does not work on fedora 15 (x86_64)
Comment 1 Stef Walter 2011-09-29 19:58:51 UTC
*** Bug 660415 has been marked as a duplicate of this bug. ***
Comment 2 Stef Walter 2011-09-29 20:01:33 UTC
Created attachment 197812 [details] [review]
ico: Skip compressed icon images

 * Previously we were selecting the largest icon image and then
   failing if it was compressed or it was somehow different than
   we expected.
 * Instead we should go back to the next largest and so on and see
   if there's one we can read.
Comment 3 Stef Walter 2011-09-29 20:02:24 UTC
The above patch fixes the issue. It's a bit bigger than you might expect because many lines got indented into a loop. I tried to keep with the (strange) code style of the io-ico.c file.
Comment 4 Matthias Clasen 2011-12-16 20:36:34 UTC
The following fix has been pushed:
9769f3d ico: Skip compressed icon images
Comment 5 Matthias Clasen 2011-12-16 20:36:37 UTC
Created attachment 203698 [details] [review]
ico: Skip compressed icon images

* Previously we were selecting the largest icon image and then
   failing if it was compressed or it was somehow different than
   we expected.
 * Instead we should go back to the next largest and so on and see
   if there's one we can read.
Comment 6 Stef Walter 2011-12-19 08:10:48 UTC
Thanks for the merge :)