Bash script to process icons for mobile-development use cases.
Uses ImageMagick (convert
) (mogrify
) to manipulate the image input
and CairoSVG to convert SVG files to PDF and PNG.
$ ./icon-tools.sh colorize $FILE "rgb(255,0,0)"
$ ./icon-tools.sh colorize $FILE "#FF0000FF"
$ ./icon-tools.sh createicons $FILE 48
$ ./icon-tools.sh createvectoricons $FILE
$ ./icon-tools.sh dominantcolor $FILE
$ ./icon-tools.sh resize $FILE 24
$ ./icon-tools.sh square $FILE transparent
$ ./icon-tools.sh trim $FILE
The script uses basename
,dirname
,grep
,head
,mkdir
,mv
,rm
,sed
,sort
,convert
,mogrify
and cairosvg
.
brew install imagemagick --build-from-source
brew install cairo libffi python3
pip3 install cairosvg
Big thanks to our contributors: