Page 1 of 1
How to correctly resize a .ico file without blurring it
Posted: 2019-10-04T16:12:03-07:00
by JoeShu95
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!
Re: How to correctly resize a .ico file without blurring it
Posted: 2019-10-04T16:23:20-07:00
by fmw42
try
Code: Select all
convert input.ico -sample 64x64 output.ico
Proper syntax reads the input first.
Re: How to correctly resize a .ico file without blurring it
Posted: 2019-10-04T16:30:41-07:00
by JoeShu95
I tried, but it is still very blurry.
Re: How to correctly resize a .ico file without blurring it
Posted: 2019-10-04T16:33:30-07:00
by JoeShu95
fmw42 wrote: ↑2019-10-04T16:23:20-07:00
try
Code: Select all
convert input.ico -sample 64x64 output.ico
I tried this command, but it is still very blurry, could you please help take a deeper look? Thank you!
Re: How to correctly resize a .ico file without blurring it
Posted: 2019-10-04T18:10:03-07:00
by fmw42
Try this
(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