The trick here is to increase the density(resolution) of the original image before doing any other processing like resizing or rotating.
% convert -density 300 inputfile.png inputfile.png
Normally, it would be necessary to specify the units (-units PixelsPerInch or -units PixelsPerCentimeter) along with density, but since PNG files only use the pixels /cm ...
You can achieve this using the sips command.
First, store your icon as follows:
In an image file of size 1024 x 1024 pixels
In png format
In a file named Icon1024.png
Then execute the following commands
sips -z 16 16 Icon1024.png --out MyIcon.iconset/icon_16x16.png
sips -z 32 32 Icon1024.png --out MyIcon.iconset/icon_16x16@2x....