For instance, to change size of the picture to 22x22 pixels (Image Magick):
$ convert -resize 22x22 〈original-file.png〉 〈new-file.png〉
$ convert -background transparent input.png -define icon:auto-resize=32 output.ico
favicon - Converting GIF's, PNG's and JPG's to .ICO files using Imagemagick - Stack Overflow
To take a screenshot interactively choosing the rectangle area with the mouse:
$ scrot -s '〈dir〉/%y%m%d%H%M%S.png'
To check saved screenshot or to view other image (with Image Magick):
$ display 〈image〉