__/ [Tom H.] on Friday 03 February 2006 21:34 \__
> <bilwallace@xxxxxxxxx> wrote in message
> news:1138993619.310109.80270@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>> Hi guys
>> I have a dataset of coloured images which I am trying to convert to
>> grayscale. I tried matlab and the problem is that I cant preserve the
>> EXIF information. Irfanview does preserve the EXIF, but the problem I
>> am having is that with the batch conversion mode of Irfanview, I cannot
>> browse and automatically convert the entire subdirectory tree. Instead
>> I have to go to each directory individually and do the conversion a
>> directory at a time.
>>
>> Can anyone suggest a way out?
>>
>> Thanks a lot
>> William
>>
> It is possible to run Irfanview from a command promt. See the help file
> for command line options.
> That will probably allow you to do it directly or from an appropriate batch
> file.
>
> Tom
Use ImageMagick < http://www.imagemagick.org/ >, which is scriptable. As an
example command:
for dir in <YOUR-BASE-PATH> ...
do
for file in ${dir}/*.jpg # or other format
do
convert <OPTIONS> ${file} ${file}
done
done
Options to pay attention to (man convert):
-colors <value>
preferred number of colors in the image
-colorspace <value>
the type of colorspace
Hope it helps,
Roy
--
Roy S. Schestowitz | Reversi for Linux/Win32: http://othellomaster.com
http://Schestowitz.com | SuSE Linux | PGP-Key: 0x74572E8E
5:40pm up 18 days 12:56, 11 users, load average: 0.82, 0.70, 0.64
http://iuron.com - next generation of search paradigms
|
|