GNOME Bugzilla – Bug 172503
Icon loading problem - top missing
Last modified: 2008-01-15 12:51:23 UTC
Distribution/Version: 2003 Please load the icons in the attachement. The top of the icons will be missing. In other viewers it is visible, this only happens in GIMP.
Created attachment 39629 [details] a zip containing two icons use one of this two icons to reproduce the bug
The right to do would've been to attach these to your previous bug report. Now we have 2 separate bugs with different info. I'm resolving the other as a duplicate as this one has files to reproduce the problem.
*** Bug 171076 has been marked as a duplicate of this bug. ***
Loads fine under linux. A screenshot of the resultant image to show what's missing would help.
Created attachment 39666 [details] The screenshot with the problem
I cannot reproduce the problem, both files load fine. There are no missing lines like in your screenshot. Are you certainly using GIMP version 2.2.4?
Yes. I actually downloaded GIMP 2.2.4 a few days ago and loaded the file at my school. The top was missing, so I don't think it has to do anything with my computer. Also, this only happens with some icons, most of them work fine (thank you GIMP). Maybe this is only in the windows version. Are you using the linux one ?
The source code to read winicon files is the same on all platforms and I even ran the plug-in in a memory profiler to check for memory corruption or use of uninitialized values. No problems were detected.
I can reproduce this with 2.2.4 on WinXP. Maybe I can research this a bit tonight.
Thanks a lot. I'm really looking forward to a new version with this bug fixed. And please excuse my English.
Eugen, so far we have no idea whatsoever what could be causing this problem. So it is unlikely to get fixed anytime soon.
I have the same problem, especially when opening icon files with multiple layers (16x16, 24x24, 32x32, 64x64, with alpha channels; some layers would be blank, and some would be missing top portion)
Let me add that the same icon opens fine in GIMP on Linux, just not on Windows
Created attachment 46457 [details] same icon in GIMP on Linux (Ubuntu) and Windows (XP SP2)
*** Bug 307634 has been marked as a duplicate of this bug. ***
Created attachment 49024 [details] Screenshot of reloaded Icon layers I have run into a similar problem with Gimp 2.2.7. I am running XP SP1. I created the icon in question in Gimp, saved it, then reopened it. Some of the icon layers came back corrupted, but I think the icon file itself is ok. (Looks good in Explorer)
I forgot some details: The icon has 8-bit, 4-bit, and 1-bit layers in 64x64, 48x48, 32x32, and 16x16 sizes. I've noticed the problem seems to occur on the 8-bit and 4-bit layers in particular. I haven't seen the problem on the 32-bit or 1-bit layers.
I have the same ICO loading problem using XP SP2 with Gimp 2.2.7. All layers load as black (16x16x8 and 16x16x4).
I, too, have this same issue. It appears as if the top 15 pixels or so are cut off. I've swapped the layers in and out repeatedly for possible odd combos and it seems like some layers, like the third one (icon#3) is blank. I tried saving the globe one as an XCF then saving the XCF as a TGA file (saving the XCF as TGA) but nothing happened - problem still there.
*** Bug 313013 has been marked as a duplicate of this bug. ***
This is definetly something that should be examined before 2.4
I just reported bug 330692. I don't believe the patches I submitted there will fix this problem, but I'm not sure and thought people working on this bug should be aware of the other one just in case. By the way, the problem manifests as follows for me (Windows XP, SP 1): The screenshot that someone attached shows what happens for 32-bpp icon files. 1-bpp icon files seem to be OK (apart from the scrambling due to the other bug), but 4-bpp and 8-bpp icon files are loaded as monochrome, even though my investigations into the other bug showed that apart from the local scrambling the RGB colors are being loaded correctly in the winicon.
Raising priority to High because this is a serious problem and has turned out to be quite difficult to figure out.
The cause of this problem is invalid file open mode. Windows performs some transformations so that windows text files could be modified in the same fashion as Linux text files. Correction: in file gimp-2.3.5\plug-ins\winicon\iconload.c (line 133) replace if (! (ico->fp = g_fopen (filename, "r"))) with if (! (ico->fp = g_fopen (filename, "rb"))) This way file is opened in binary mode and no transformations are made. File now loads ok. However, preview while opening doesn't seem to use code from the winicon plugin so it still displays the wrong version. I think the same changes must be made there too.
Created attachment 70865 [details] [review] Top isn't missing anymore Fixed top missing problem - at least for opened documents. Preview code doesn't seem to use the plugin.
The thumbnail is cached on disk. Look at the thumbnail preview's tooltip and force it to update the preview.
Thanks a lot for debugging this. Now fixed in both branches. 2006-08-14 Sven Neumann <sven@gimp.org> * plug-ins/winicon/icoload.c: open the file in binary mode. Pointed out by Aurimas Juska; fixes bug #172503.