Batch convert BMP to JPEG/PNG

RampantAndroid

Diamond Member
Jun 27, 2004
6,591
3
81
Hi all,

Looking to batch convert a few hundred images from BMP to JPEG or PNG - what's the best way to do this? Is there a app out there that I can just right a shell script for?

Thanks!
RA
 

Snapshot1

Member
Dec 26, 2011
42
0
0
If you do want to script, you can use imagemagick

http://www.imagemagick.org/script/index.php

Imagemagick is very powerful, it has more options than most of us will ever need.

Assuming it is installed in the typical manner here is a very simple script to convert all BMP files in the current directory to PNGs:
Code:
for %%f in (*.bmp) do (convert %%~nf.bmp %%~nf.png)
Save this as something like "BMP2PNG.CMD" in the folder containing the files you want to convert and run it.

You can add the /R switch to the for command to process files in sudirectories, and any options needed to the convert command.

Snapshot1
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
Imagemagick is very powerful, it has more options than most of us will ever need.

Assuming it is installed in the typical manner here is a very simple script to convert all BMP files in the current directory to PNGs:
Code:
for %%f in (*.bmp) do (convert %%~nf.bmp %%~nf.png)
Save this as something like "BMP2PNG.CMD" in the folder containing the files you want to convert and run it.

You can add the /R switch to the for command to process files in sudirectories, and any options needed to the convert command.

Snapshot1

I second using Imagemagick from shell scripts, it's an integral part of my RAW processing.