Creating Windows icons
Creating Windows icons
Hi!
I'm trying to create some layered images in a format that supports layers and is readable by the GIMP. I've tried PSD, MNG and TIFF, but the PSD images comes out all garbled and the MNG and TIFF images are flattened. Writing to XCF (GIMP native format) doesn't seem to be supported by ImageMagick. I would appriate some help.
Thanks!
-Mike
I'm trying to create some layered images in a format that supports layers and is readable by the GIMP. I've tried PSD, MNG and TIFF, but the PSD images comes out all garbled and the MNG and TIFF images are flattened. Writing to XCF (GIMP native format) doesn't seem to be supported by ImageMagick. I would appriate some help.
Thanks!
-Mike
Last edited by SharkD on 2008-09-28T11:36:25-07:00, edited 1 time in total.
Re: Saving to a format that supports layers
Update: I was able to save as TIFF with multiple frames. The GIMP then asks if I want to convert each frame to a layer when I open the TIFF file.
Still, being able to save directly to an layered image would be a time-saver.
Still, being able to save directly to an layered image would be a time-saver.
Re: Creating Windows icons
When creating Windows icons there is a strange border surrounding the image.
Here is an example of what it looks like:
Here is what it's supposed to look like:
Can someone please describe how to get rid of it?
Here is the command-line I am using:
I've also tried using this:
I am using ImageMagick version 6.3.7 Q16.
Thanks!
-Mike
Here is an example of what it looks like:
Here is what it's supposed to look like:
Can someone please describe how to get rid of it?
Here is the command-line I am using:
Code: Select all
convert abomination_256_fate.png abomination_048.png abomination_032.png abomination_016.png abomination_fate.ico
Code: Select all
convert abomination_256_fate.png abomination_048.png abomination_032.png abomination_016.png -alpha on -channel RGBA -depth 8 abomination_fate.ico
Thanks!
-Mike
Re: Creating Windows icons
I updated to the latest version of IM and the problem no longer exists. However, one oddity is that I have to reverse the alpha channel of the input images before converting them to icons.
Here's the command-line I used:
Also, I haven't yet figured out how to compress the Vista icon (256x246px). Compression should bring the file size down to about 25% of normal.
Here's the command-line I used:
Code: Select all
convert fate_abomination_256.png fate_abomination_048.png fate_abomination_032.png fate_abomination_016.png -channel Alpha -negate fate_abomination.ico
Last edited by SharkD on 2008-09-28T18:57:54-07:00, edited 1 time in total.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Creating Windows icons
If you are running Q16 IM, then add -depth 8. That will cut your size in half.
As for GIF compression, see -colors and -quantization
http://www.imagemagick.org/Usage/formats/#gif
http://www.imagemagick.org/Usage/quantize/#colors
As for GIF compression, see -colors and -quantization
http://www.imagemagick.org/Usage/formats/#gif
http://www.imagemagick.org/Usage/quantize/#colors
Re: Creating Windows icons
The icons use the PNG format, not GIF.
I've tried "-compress Zip" and "-compress Lossless", but neither have an effect on the file size. The input file (a compressed PNG file--the second image in the above post) is ~76KB; the output file (an Windows icon) is ~265KB.
Incidentally, using "-compress None" on the source image doesn't remove the compression: the file stays at 76KB.
Here are the command lines I am using:
The first is for compressing the icons; the second is for removing compression from the source image.
Also, I wasn't sure which form of compression to use. Wikipedia says PNG uses zlib compression. I took a wild guess and assumed that this is what the "Zip" compression is referring to.
I've tried "-compress Zip" and "-compress Lossless", but neither have an effect on the file size. The input file (a compressed PNG file--the second image in the above post) is ~76KB; the output file (an Windows icon) is ~265KB.
Incidentally, using "-compress None" on the source image doesn't remove the compression: the file stays at 76KB.
Here are the command lines I am using:
Code: Select all
convert fate_abomination_over.png -compress Zip fate_abomination_test.ico
Code: Select all
convert fate_abomination_over.png -compress None fate_abomination_test.png
Also, I wasn't sure which form of compression to use. Wikipedia says PNG uses zlib compression. I took a wild guess and assumed that this is what the "Zip" compression is referring to.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Creating Windows icons
See http://www.imagemagick.org/Usage/formats/#png for PNG compression.
Also what about -depth 8 or are you on Q8 IM?
You many need some other png compression tool other than IM. See the apps mentioned in the above link.
Anthony may be able to help more.
Also what about -depth 8 or are you on Q8 IM?
You many need some other png compression tool other than IM. See the apps mentioned in the above link.
Anthony may be able to help more.
Re: Creating Windows icons
Another problem related to the reversed alpha issue I mentioned above is that, after inverting the alpha channel, the "thumbnail preview" of the icon shows only the mask (or, rather the image with the inverse of the alpha channel applied to it). Not inverting the alpha channel results in the thumbnail preview rendering properly, but then the icons themselves suffer from this problem.
I believe this is a sign that there is a bug in ImageMagick where masks are being processed instead of alpha channels in some cases, and/or vise versa.
[edit]
Yes, I am using Q8.
After reading the article you linked to I tried the following command-line without success:
I believe this is a sign that there is a bug in ImageMagick where masks are being processed instead of alpha channels in some cases, and/or vise versa.
[edit]
Yes, I am using Q8.
After reading the article you linked to I tried the following command-line without success:
Code: Select all
convert fate_abomination_over.png -compress Zip -quality 95 fate_abomination_test.ico
-
- Posts: 1015
- Joined: 2005-03-21T21:16:57-07:00
Re: Creating Windows icons
According to the wikipedia article on the icon file format, http://en.wikipedia.org/wiki/ICO_(icon_ ... le_format), the 256x256 icon can be "PNG compressed".
However, I've had a brief look through the source code for the icon coder and as far as I can tell it does not do any compression at all.
Pete
However, I've had a brief look through the source code for the icon coder and as far as I can tell it does not do any compression at all.
Pete
Re: Creating Windows icons
Note also that the GIMP provides users with several options regarding colordepth and compression for each frame of the file.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Creating Windows icons
Sorry, I doubt I can help any further at this point.
However, there were quite some changes going on in IM 6.4.4.-7 regarding -alpha. see changelog http://www.imagemagick.org/script/changelog.php and also Controlling Transparency on http://www.imagemagick.org/Usage/basics/
Don't know if that relates to your problem.
If you think there is a problem, then I would suggest you report it on the Bugs forum, if you don't get any where further.
If it is a new compression feature that you need (to match GIMP or just missing), then I recommend you suggest it on the Developers forum.
However, there were quite some changes going on in IM 6.4.4.-7 regarding -alpha. see changelog http://www.imagemagick.org/script/changelog.php and also Controlling Transparency on http://www.imagemagick.org/Usage/basics/
Don't know if that relates to your problem.
If you think there is a problem, then I would suggest you report it on the Bugs forum, if you don't get any where further.
If it is a new compression feature that you need (to match GIMP or just missing), then I recommend you suggest it on the Developers forum.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Creating Windows icons
Check with the latest version of Im to see if the transparency channel is being handled correctly for ICO images.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Creating Windows icons
I don't see a change log for 6.4.4.-7.fmw42 wrote:However, there were quite some changes going on in IM 6.4.4.-7 regarding -alpha. see changelog http://www.imagemagick.org/script/changelog.php and also Controlling Transparency on http://www.imagemagick.org/Usage/basics/
I am already using 6.4.4 Q8 which I think is the latest version.anthony wrote:Check with the latest version of Im to see if the transparency channel is being handled correctly for ICO images.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Creating Windows icons
He meant 6.4.3-7
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Creating Windows icons
The version I have supercedes 6.4.3-7 doesn't it? So, I should go ahead and file a bug report, right?