Code: Select all
magick "%~1" -resize 256x256 -gravity center -extent 256x256 -define icon:auto-resize="256,128,96,64,48,32,16" "%~n1.ico"
how to make the white color to tranparent?
Code: Select all
magick "%~1" -resize 256x256 -gravity center -extent 256x256 -define icon:auto-resize="256,128,96,64,48,32,16" "%~n1.ico"
Code: Select all
magick "%~1" -resize 256x256 -gravity center -background none -extent 256x256 -define icon:auto-resize="256,128,96,64,48,32,16" "%~n1.ico"
Code: Select all
@echo off
set inkScape="C:\SOFTWARE\GRAPHIC\INKSCAPE\inkscape.exe"
set imageMagick="C:\SOFTWARE\DEVELOPER\IMAGEMAGICK\magick.exe"
set fileName=favicon
set importType=svg
set exportType=png
set exportDpi=300
set imageSizes=(16 24 32 48 57 60 64 70 72 76 96 114 120 128 144 150 152 180 192 196 256 300 320 400 450 460 480 512 600)
for %%s in %imageSizes% do (
%inkScape% -z -f %~dp0%fileName%.%importType% -w %%s -h %%s -e %~dp0%fileName%-%%sx%%s.%exportType% -d %exportDpi%
echo CREATED: %fileName%-%%sx%%s.%exportType%
set e=%fileName%-%%sx%%s.%exportType%
call :concat (e)
)
%imageMagick% %exportFileNames%"%~dp0%fileName%.ico"
echo MERGED IN: %fileName%.ico
pause goto :eof
:concat (e) (
set exportFileNames=%exportFileNames%"%~dp0%e%"
)
Code: Select all
del FILE
Code: Select all
%imageMagick% %exportFileNames%"%~dp0%fileName%.ico"