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"
How to Use DENSITY setting BEFORE Vector Designation
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How to Use DENSITY setting BEFORE Vector Designation
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"
-
- Posts: 9
- Joined: 2015-01-12T14:56:33-07:00
- Authentication code: 6789
- Location: Uniondale NY, USA
Re: How to Use DENSITY setting BEFORE Vector Designation
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.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: How to Use DENSITY setting BEFORE Vector Designation
Fred's guess is correct. He had:
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.... convert -density 300 "%~a" ...
snibgo's IM pages: im.snibgo.com
-
- Posts: 9
- Joined: 2015-01-12T14:56:33-07:00
- Authentication code: 6789
- Location: Uniondale NY, USA
Re: How to Use DENSITY setting BEFORE Vector Designation
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.
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.