Page 1 of 1
How to Use DENSITY setting BEFORE Vector Designation
Posted: 2017-11-26T14:46:32-07:00
by jpeni
It is recommended to use the -density option BEFORE the vector file format is specified in the command to preserve output quality. For example:
convert -density 300 "C:\Originals\File.eps" -depth 8 "C:\Previews\File.PNG"
This works for individual images, but how do you enter -depth options BEFORE specifying the vector format in the following recursive command?
FOR /R %a IN (*.eps) DO convert -depth 8 -threshold 40% -alpha off "%~a" "%~dpna.png"
Re: How to Use DENSITY setting BEFORE Vector Designation
Posted: 2017-11-26T14:55:44-07:00
by fmw42
Sorry I do not use Windows so this is a guess. But you need to read the input first apart from the density and put your other arguments after reading the input.
Code: Select all
FOR /R %a IN (*.eps) DO convert -density 300 "%~a" -depth 8 -threshold 40% -alpha off "%~dpna.png"
Re: How to Use DENSITY setting BEFORE Vector Designation
Posted: 2017-11-26T16:18:46-07:00
by jpeni
Thanks for your guess, but you did not use the -density option BEFORE specifying the VECTOR format. For vector graphics, ImageMagick has both a render resolution and an output size that are independent of each other so the density must be specified BEFORE the VECTOR format.
Re: How to Use DENSITY setting BEFORE Vector Designation
Posted: 2017-11-26T16:27:05-07:00
by snibgo
Fred's guess is correct. He had:
... convert -density 300 "%~a" ...
In the "convert" command, we specify the "-density" before reading the vector file, so the software that rasterizes the vector data will use that dpi.
Re: How to Use DENSITY setting BEFORE Vector Designation
Posted: 2017-11-26T16:44:31-07:00
by jpeni
Thanks. Now I recognize how Fred's placement of the "%~a" option placed the -density BEFORE the eps was specified.
Please: For those of us who need guidance - when you provide a suggested solution - please explain how your solution fixes the stated problem so we can understand.