Hi there,
My application needs to resize .ico files, but it seems using the following command directly will blur the output to a great extent:
$ convert -resize 64x64 input.ico output.ico
I am using imagemagick on linux red hat 7. I searched all previous topics but didn't find anything related.
The sample image I used: http://www.iconarchive.com/download/i98 ... d/Xbox.ico
Thanks a lot!
How to correctly resize a .ico file without blurring it
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How to correctly resize a .ico file without blurring it
try
Proper syntax reads the input first.
Code: Select all
convert input.ico -sample 64x64 output.ico
Re: How to correctly resize a .ico file without blurring it
I tried, but it is still very blurry.
Re: How to correctly resize a .ico file without blurring it
fmw42 wrote: ↑2019-10-04T16:23:20-07:00 try
I tried this command, but it is still very blurry, could you please help take a deeper look? Thank you!Code: Select all
convert input.ico -sample 64x64 output.ico
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How to correctly resize a .ico file without blurring it
Try this
(unix syntax)
or
(windows syntax)
Or just remove the higher resolution parts.
(unix syntax)
Code: Select all
convert input.ico -delete 1--1 \
\( -clone 0 -resize 16x16 \) \
\( -clone 0 -resize 32x32 \) \
\( -clone 0 -resize 48x48 \) \
\( -clone 0 -resize 64x64 \) \
-delete 0 -background none output.ico
or
(windows syntax)
Code: Select all
convert input.ico -delete 1--1 ^
( -clone 0 -resize 16x16 ) ^
( -clone 0 -resize 32x32 ) ^
( -clone 0 -resize 48x48 ) ^
( -clone 0 -resize 64x64 ) ^
-delete 0 -background none output.ico
Or just remove the higher resolution parts.
Code: Select all
convert input.ico -delete 0-3 -background none output.ico