954,483 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

BMP to JPEG Converter

I need to load a BMP into C++ and code a program to convert it into a JPEG. I have very little programming experience and am wondering what libraries should be used to efficiently convert an image in this way.

Is there a library that will convert the BMP straight to a JPEG? Or is it the case that the file will need to be loaded in and the data displayed in an array from which the calculations on that array will take place?

Any help is greatly appreciated.

SoftEngGroupE
Newbie Poster
1 post since Mar 2010
Reputation Points: 10
Solved Threads: 0
 

If you have a sufficient version of microsoft visual studio
you might be able to use the CImage class

http://msdn.microsoft.com/en-us/library/d06f3fhw(VS.80).aspx

however, express doesn't have this.

Otherwise it is a messy procedure as there is more than one jpeg encoding you probably will need to read up on bitmap headers or find someone's sample code.

tetron
Junior Poster
199 posts since Feb 2010
Reputation Points: 32
Solved Threads: 37
 

First of all, the BMP fileformat, is quite simple to handle and load, check it out, it's all uncompressed, and it basically:

Header (all the info stuff)
RawData

The JPG is a lot worse, I would use DevIL to compress and convert your BMP :)

Saabrina
Newbie Poster
9 posts since Mar 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: