flatten removes transparency so use it only for ico format
use colorspace option instead of flatten to keep transparency
Merge pull request #4 from metalon/master

retain transparency