Question : Write compressed bmp file

I want to how to write bmp image to a file. so that it can be viewed using MS Paint.
I have read the bmp image and performed:
1 ) dct 2) Quantization and zigzag scanning. 3)dequantized and Inverse DCT ia apllied.
I have generated char unsigned Array[256][256] which stores the result. i want to know how to store the image (Header and pixel values). I have considered 256-bitmap file as input image.(bit depth 8 color image or gray scale image)

Answer : Write compressed bmp file

You will find the code in this artile:

Win32: Capture an image

http://www.experts-exchange.com/Programming/System/Windows__Programming/A_1739-Win32-Capture-an-image.html

Funtcion Capture makes an image and saves it in a file.

Standard BMP-file has a a file header (BITMAPFILEHEADER) in the beginning, then BITMAPINFOHEADER and the bit-array. Last two parts is the dib-section, actually.

There is a short and clear article in MSDN:

Storing an Image

http://msdn.microsoft.com/en-us/library/dd145119(v=VS.85).aspx

Random Solutions  
 
programming4us programming4us