Sarah Williams a écrit :
Hi,
I wondered if anyone could recommend a free application that would
enable me to convert jpg files to ecws in bulk. At the moment I am
having to compress one at a time using ER Mapper ECW Compressor 2.2 and
it is taking forever - I have 1,877 to do!!
One solution is to use ecw compressor as command line in a .bat or other
batch file. I personnaly have installed cygwin (without the x-windows
stuff), so i can use all the power of unix shell on Windows, and it's
free ! We converted with this script more than 5000 files in a night on
a good computer (just launch the command before leaving, and next
morning, Wow! it's done !)
Here is an example : convert all TIFF files from directory dpt to ecw in
dpt_modif. You need a symbolic link from the cygwin /bin directory to
the ecw_compressor.exe windows executable. It is named ecw_compress
here. You must also use '\' (use '\134') instead of '/' in the
ecw_compress command line.
basedir="/cygdrive/e/dpt"
outdir="/cygdrive/e/dpt_modif"
for f in "$basedir"/*.TIF
do
outname=`basename "$f" .TIF`
dirorig=`dirname "$f"`
infile=`echo "$f" | sed -e 's/\/cygdrive\/e/E:/' | tr '/' '\134' `
outfile=`echo "$outdir/$outname.ecw" | sed -e 's/\/cygdrive\/e/E:/'
| tr '/' '\134' `
ecw_compress "$infile" -o "$outfile" -nowait -c 20 -rgb -e best
sed 's/tif/ecw/' "$dirorig/$outname.tab" > "$outdir/$outname.tab"
done
--
Michel Wurtz
MAP/SG/SM/SDSI/CERIT/DIG
B.P. 12668 - 31326 Castanet-Tolosan Cedex
_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l