There's an excellent package for image manipulation called FreeImage. In fact, I believe the image maipulation in DBC is based on or uses to an extent the FreeImage library. Using some of the tools in DBC and FreeImage together you could read the files from a directory as one format (bmp in this case) and save them as another format (png in this case). You'll have to use the DLL commands in DBC; but the code would look something this assuming we are working in the directory where all of the files are stored:
rem load the dll
load dll "Freeimage.dll",1
rem initialize the freeimage dll
call dll 1,"_FreeImage_Initialise@4",0
FIF_BMP = 0
FIF_PNG = 13
rem load a bitmap and save it to the pointer bmpptr
perform checklist for files
for n=1 to checklist quantity()
fname$=checklist string$(n)
if len(fname$) > 4
if lower$(right$(fname$,4)) = ".bmp"
bmpptr=call dll(1,"_FreeImage_Load@12",FIF_bmp,fname$,0)
rem save the bitmap identified by the pointer bmpptr as png
newfname$=left$(fname$,len(fname$)-4)
newfname$=newfname$+".png"
call dll 1,"_FreeImage_Save@16",FIF_PNG,bmpptr,newfname$,0
endif
endif
next n
rem release the resources held by freeimage
call dll 1,"_FreeImage_DeInitialise@0"
To use all of the commands in FreeImage, you'll need a tool to look up the C++ mangled versions ofthe function names. Dependency Walker is pretty good for that. You'll also need to look up the values for the various image types. For example,
FIF_BMP = 0
FIF_PNG = 13
If you want more control through a gui and such, there's another open source package called ImageMagick. Though I remember using a GUI in linux for this, I don't know if the windows version has a gui - but anyway, it is a very complete package with a lot of great tools. I tried it on Windows some time ago, but it was just too bulky for me to have any real use for it; and it was very difficult to get it to talk to DBC - thouigh I think the command line options were fine. FreeImage was a bit better suited for my needs.
ImageMajick
The FreeImage Project
Enjoy your day.