in reply to Convert BMP to JPG?

with win XP, they convert format when you rename the file if 'show known file types' is set in the folder option. I converted about 400 bmp's with something simliar to the code on the bottom, my attempts were to change the names to numbers, and change files types.
opendir (PICS, "path/to/pics") || die ""; while ($name = readdir PICS) { if ($name =~ m/bmp$/i) { $numb++; rename $name, $numb . "jpg"; } }
JPL

Replies are listed 'Best First'.
Re: Re: Convert BMP to JPG?
by jdavidboyd (Friar) on Sep 15, 2003 at 18:32 UTC
    This doesn't convert the file! It just renames it, and windows displays it as the new type because of the extension.
Re: Re: Convert BMP to JPG?
by Anonymous Monk on Sep 15, 2003 at 03:14 UTC
    oh sweet baby Jesus, that's some scary stuff ( foo.SueMe .... owe micro$oft millions of dollars instantaneously, scary ).