My program creates BMP files, hundreds or thousands of them and how those files are huge I need to compress them somehow. The first thing that came to mind would turn them into JPEG files.
Anybody have some algorithm to compress the BMP or an example of how to convert them to JPEG using C language, if possible without the use of SDL or the like?
Just like read/write various image file formats, you also have various compression libraries. Some are Open Source, some are not.
Unless you want to create your own version which means the receiving parties also need your program to de-compress it, I would recommend surf Google for some Open Source compression libraries ready to use. I always think Winzip is Open Source but obviously it is not. But somehow almost any Windows programs I uses can understand winzip files so strange isn't it ?
I believe before Winzip there is Pkzip by PKWare which revolutionize the computer world during that time. http://en.wikipedia.org/wiki/PKZIP
You could use GdiPlus to save them as JPEG, PNG or another format. No 3rd party tools needed.
If you could use ATL::CImage class will be very few lines of code.
Just use Shell apis.
What? I am not aware of any shell that has built-in conversion from bmp to jpeg, I don't see why I a shell should have such a function, nor do I see how that's going to help him doing this on runtime (which he is probably trying to do).
>What? I am not aware of any shell that has built-in conversion from bmp to jpeg, I don't see >why I a shell should have such a function, nor do I see how that's going to help him doing >this on runtime (which he is probably trying to do).
It's even a Win32 FAQ
(news://nntp.aioe.org/comp.os.ms-windows.programmer.win32 or http://tinyurl.com/cmhb5g by Google Groups)