Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Bitmap to PNG Converter

Author
Message
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 3rd Jan 2009 18:10 Edited at: 3rd Jan 2009 18:12
So,

I have to convert 360 images in BMP format to PNG. I have this program installed(I think it came with a windows update) where you can select your files, rightclick and select "Convert to File Format...", but that exported all of the images in weird dimensions other than the original dimensions (example : import a 256*256 bitmap ---> Export a 192*605 PNG ? WTF??).

So I decided to look for a program on google, but they all suck, and they all want money for their "great" programs, but what is the use of a program that can convert what I want, but only one image at a time, causing me to click a total amount of 3962 times(yes, I calculated that)??? I could easily do the same with the terrible excuse of a paint program "PAINT", and get the job done quicker!

So then, I came to the conclusion of asking the forum. Can anyone recommend a program that could convert 360 Bitmap images to PNG images? I need a program where you can select MULTIPLE files at once.

Thank you in advance,

TheComet

Peachy, and the Chaos of the Gems

Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 4th Jan 2009 00:18 Edited at: 4th Jan 2009 00:24
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:



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.
The Great Bluestar
17
Years of Service
User Offline
Joined: 21st Dec 2008
Location:
Posted: 5th Jan 2009 00:38
or you could do manually with each one using mspaint (file->save as)
This would save it acurately , but would take a lot of time

bluestar~

Login to post a reply

Server time is: 2026-07-05 01:47:30
Your offset time is: 2026-07-05 01:47:30