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.

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.

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 :)

Hi all. i nee d to convert .jpeg file to .bmp or grascale image using C code. can anyone help me out.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.