Help, I'm Stuck!

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Themisive

Help, I'm Stuck!

Post 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
HugoRune
Posts: 90
Joined: 2009-03-11T02:45:12-07:00
Authentication code: 8675309

Re: Help, I'm Stuck!

Post 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
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Help, I'm Stuck!

Post 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
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
Themisive

Re: Help, I'm Stuck!

Post 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.
Post Reply