how to read and write an image file in C

May 6, 2010 at 03:07:51
Specs: Windows XP
I am doing an image compression program...for that I need to get the pixel value of the image which I want to store in to an file for future use...

See More: how to read and write an image file in C

Report •

#1
May 6, 2010 at 10:00:57
Have you tried the GetPixel API? I haven't used it myself; however from the platform SDK, you've got.

COLORREF GetPixel(hDC, x_coord, y_coord);

It returns a dword or CLR_INVALID on error.

BYTE GetRValue(DWORD pclr);
BYTE GetBValue(DWORD pclr);
BYTE GetBValue(DWORD pclr);

HTH


Report •
Related Solutions


Ask Question