Page 1 of 1

Help, I'm Stuck!

Posted: 2009-08-28T14:54:52-07:00
by Themisive
I have the latest version of ImageMack - ImageMagick-6.5.5-4-Q16-windows-dll.exe - that I was advised by a friend to get. The problem is that I want to not only create "Batch Files", I also want to save them to either a jpg or a png format, and delete the existing bmp format files.

At the moment I am playing Elder Scrolls IV:Oblivion by Bethesda; unfortunately I need to alter the BMP file formats (which can be 1Mb+) to a smaller JPG format that is easily sent over the internet.

The PNG files would be used for making DDS files and NIF files. Whilst I have graphics programmes capable of saving to these file formats, I am looking for a system that will convert BMP formats to either and then delete the original file. It sounds easy, but I have often found that "easy" is usually the hard way to do things!

Regards

Themisve

Re: Help, I'm Stuck!

Posted: 2009-08-28T16:01:10-07:00
by HugoRune
I am not sure I understand what you want.

but converting all bmp files to png in the current directory on windows is done with
FOR %a in (*.bmp) DO convert %a %~na.png

If you put this line in a batch file, you have to double all %:
FOR %%a in (*.bmp) DO convert %%a %%~na.png

deleting can be done afterwards by "del *.bmp", but I would not do that part automatically.

also see http://www.imagemagick.org/Usage/windows/#scripts

Re: Help, I'm Stuck!

Posted: 2009-08-28T16:18:17-07:00
by el_supremo
You can use the mogrify command to convert all the BMP files in a directory to JPG and then delete *.bmp once you're sure the conversions were OK.

Code: Select all

mogrify -format jpg *.bmp
See: http://www.imagemagick.org/script/mogrify.php

Pete

Re: Help, I'm Stuck!

Posted: 2009-08-29T04:44:04-07:00
by Themisive
Thanks for the help, I think that I'll stick to a couple of grahics programmes I already have, both of which can save to either PNG or JPG.