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 342883 - GIMP doesn't save ICO files properly when indexed
GIMP doesn't save ICO files properly when indexed
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
2.2.x
Other All
: Normal normal
: 2.2
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2006-05-25 05:06 UTC by Nick Smith
Modified: 2008-01-15 13:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test case - Index it and save as ICO (1.22 KB, application/octet-stream)
2006-05-25 05:08 UTC, Nick Smith
Details

Description Nick Smith 2006-05-25 05:06:39 UTC
Please describe the problem:
When you save an image file as an ICO file when you index it, the file is saved
as all black.  Also, when saving as 4-bit ICO, the icon doesn't save properly as
some details are left out.

Steps to reproduce:
1.  Open the XCF sample file I attached.
2.  Index it (256 maximum colors with no dithering).
3.  Save it as an ICO in 4, 8, or 32-bit color mode.
4.  View the file by reopening it (the icon shown in the open recent dialog is
okay, but seeing the opened image file in GIMP or via Windows Explorer is where
it's all black.

Actual results:
The icon is saved as all black without any color at all.

Expected results:
The colors should be kept as is, unless there are more colors in the image than
the palette can store where extras are merged into existing ones or deleted
still leaving the image relatively in tact.

Does this happen every time?
As far as I can tell, yes.

Other information:
When saving into 4-bit mode without indexing it, the top 11 or so pixels are cut
off, but the icon appears fine otherwise.  This doesn't seem to apply to 8-bit
or 32-bit mode.
Comment 1 Nick Smith 2006-05-25 05:08:38 UTC
Created attachment 66165 [details]
Test case - Index it and save as ICO

This is the test case.  Just convert it to indexed mode and save as an ICO.
Comment 2 Sven Neumann 2006-05-29 10:44:54 UTC
The plug-in doesn't seem to handle indexed images very well. You are better off starting with an image in RGB mode.
Comment 3 Sven Neumann 2006-08-24 15:10:53 UTC
Fixed in the both branches. Dude, this code urgently needs a cleanup.

2006-08-24  Sven Neumann  <sven@gimp.org>

	* plug-ins/winicon/icodialog.c
	* plug-ins/winicon/icosave.c: fixed handling of indexed images
	(bug #342883).