Page 2 of 2

Re: Need Dev Help for Tiff export workaround

Posted: 2014-06-19T10:43:03-07:00
by fmw42
Suppose you ai images are in folder1. Set up a new directory, folder2, to hold the output images so that you do not write over the originals.

Then do

Code: Select all

cd folder1
mogrify -path path2/folder2 -format tiff -density 300 -background white -flatten -compress lzw *.ai
However, I fear, in hindsight, that this will not work, because I do not think it will apply the density before reading the ai files and will try to set it afterwards.


You may have to write loop over all the files in folder1, process them with convert, and write them to folder2

If your files have no spaces, you can do

Code: Select all

cd folder1
list=`ls`
for img in $list; do 
name=`convert $img -format "%t" info:`
convert -density 300 $img -background white -flatten -compress lzw path2/folder2/${name}.tiff
done
The -format "%t" info: gets the filename without the suffix. See http://www.imagemagick.org/script/escape.php

This can be put into a bash shell script with arguments for density and input and output directories.

Re: Need Dev Help for Tiff export workaround

Posted: 2014-06-19T18:22:59-07:00
by MADubs
This is working perfectly. Thank you for you all your help!