Photoshop has the scaling option "Bicubic Sharper (reduction)", which produces less blurry, more legible images, compared to PNG to ICO. It's more noticable the smaller the image, and on 16x16, it can make a huge difference.
Here are two comparisons
Comparison screenshots
Open in different tabs or something to compare.
PNG to ICO:
![Java (PNG to ICO)](https://private-user-images.githubusercontent.com/148799361/349676370-ac9463d6-db36-40a2-8ed0-befbf48aba6d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQzMTA0ODIsIm5iZiI6MTcyNDMxMDE4MiwicGF0aCI6Ii8xNDg3OTkzNjEvMzQ5Njc2MzcwLWFjOTQ2M2Q2LWRiMzYtNDBhMi04ZWQwLWJlZmJmNDhhYmE2ZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODIyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyMlQwNzAzMDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hYWE5MWZmNzZjZmViMjJjNWIxYzg5MmYyNGE0MTVkYmRhMDU3OWI3NDhkYmU1MGU4M2EwMGM1NmY2YWViOGIzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.ZOlnBcrNg7JF5HX3J6t600hEMh3ncizlKHS9vulgAZI)
Bicubic Sharper:
![Java (PBicubic Sharper)](https://private-user-images.githubusercontent.com/148799361/349676439-2b65aac6-dddb-4b00-9422-9ef3542337df.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29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AwYTNiZTg4YjVkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.UPnwb71N9YeXlKpmGtAKgB2x4IM5XLK58Uupo_24Rvo)
In the Java image, at 256x256, it's actually much sharper than the original image. So, I guess it comes at the cost of authenticity, and it might get oversharpened in some cases. But at lower resolutions, the sharpening is needed. Icons should be legible. There have been cases where I've manually sharpened a photo to a sweet spot in Photoshop, saved it at 256x256, looked fine, then converted with PNG to ICO, and it became way too blurry at lower resolutions.
Image Magick does not have Bicubic Sharper. I tried Lanczos and Box, hardly any difference. But a developer named Jason Summers has managed to imitate Bicubic Sharper rather faithfully with Image Magick. See Notes on Photoshop’s image resize algorithms.
I removed the crop parts of the command (because I did not have time to figure that out), and changed convert
to magick
(IM says convert
is depricated), and the result is barely indistinguishable from Photoshop!
Screenshot
Bicubic Sharper imitation
![Java (Bicubic Sharper imitation)](https://private-user-images.githubusercontent.com/148799361/349692791-5940d647-4ade-46c9-807e-e0c75bd8edd3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQzMTA0ODIsIm5iZiI6MTcyNDMxMDE4MiwicGF0aCI6Ii8xNDg3OTkzNjEvMzQ5NjkyNzkxLTU5NDBkNjQ3LTRhZGUtNDZjOS04MDdlLWUwYzc1YmQ4ZWRkMy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODIyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyMlQwNzAzMDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01N2QyZmQxMjA3NTU3ZWEwOGI0MDkwOGFiODQ1MTNhYzU2MWI0OGQzOTljMDI3NjU2NDA5ZmMxNmU0MGUyZDY1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.310n8Dsw-P0JyCIE4W-78gpnn8zdX564tFJy_3KHNPc)
I don't know why that last picture is 256x255. The command prompt says I entered 256x256.
A compromise could be to sharpen at resolutions 128x128 (or 96x96) and below, but use normal resizing on the higher resolutions. I have done it like that one or two times when scaling manually with Photoshop, when I wanted authenticity.
Here are the original pictures:
Download URL
https://drive.google.com/file/d/1PyA9RvyP6e6pK-LkbkVkEIVDW8omRQQX/view
(The Java image is public domain, the woman is free to use under the Unsplash license, published by the user see plus.)