Using -density in a loop in a batch in Windows 10
Posted: 2018-02-22T01:08:48-07:00
magick chunk.tif -density %%[fx:w/8.26] chunk.pdf works fine but I want to make a loop for a series of images with this batch:
for /l %%a in (1,1,%1) do (
call magick p%%a.tif -density %%[fx:w/8.26] q%%a.pdf
)
and when I type mybatch 5 I obtain magick: invalid argument for option 'density' 'w/8.26]' ar CLI arg 2 @error/operation.c/CLISettingOptionInfo/726 at every image.
It seems the argument of -density is cropped in this context. Why? If there is no loop magick works fine in a batch.
for /l %%a in (1,1,%1) do (
call magick p%%a.tif -density %%[fx:w/8.26] q%%a.pdf
)
and when I type mybatch 5 I obtain magick: invalid argument for option 'density' 'w/8.26]' ar CLI arg 2 @error/operation.c/CLISettingOptionInfo/726 at every image.
It seems the argument of -density is cropped in this context. Why? If there is no loop magick works fine in a batch.