I am not an expert on ICO files, since I do not use Windows, nor am I an SVG expert. But SVG files are vector files and I believe the size depends upon the density assigned to it. I could be wrong about this. If you want a 256x256 ICO, you need to have a 256x256 size input image. So you must assign a density to achieve this size.
If the size is built in, then you must modify your SVG files to make 256x256 images when displayed or read or resize them using -resize.
density=256*72/48=384
So this might do it.
Code: Select all
convert -density 384 file1.svg file1.ico
If you want multiple sizes in the ICO. Then you need to use the ICO define
Code: Select all
convert -density 384 file1.svg -define icon:auto-resize file1.ico
see
http://www.imagemagick.org/script/comma ... php#define
However, mogrify should be able to do all your images in any one folder at one time.
see
http://www.imagemagick.org/Usage/basics/#mogrify
# create a new directory, so you do not overwrite your old one. Say folder2. Assume you images are in folder1. Cd or whatever the Windows equivalent is to folder1 holding your images.
Code: Select all
mogrify -path path2/folder2 -format ico -density 384 *.svg
This assumes that all your svg files need the same density to achieve 256x256 pixel size. A way around this would be to use a large density and then resize to 256x256
Code: Select all
convert -density 600 file1.svg -resize 256x256 file1.ico
or
Code: Select all
mogrify -path path2/folder2 -format ico -density 600 -resize 256x256 *.svg
Of course this assumes your input svg files are created so that they are square. If not, then you have to decide whether you want to pad to square or crop to square. If cropping, then 256x256^^ or "256x256^" in windows syntax. Note there are difference between windows syntax and unix syntax. See
http://www.imagemagick.org/Usage/windows/
I have not tested this, since I am not on windows.
Perhaps some Windows user can test and correct me if I am wrong about this.
If you are not on a current version of Imagemagick, the -define may not work. You do not say. It is usually a good idea to identify your version of Imagemagick and platform.
You can get the IM version using
For new users, see
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/script/comma ... ptions.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/