How to convert jpg image to rgb
-
Hello, I have managed to pull a program from one of the articles that displays an image(jpg) I have added the following code to get each pixel on the screen COLORREF color = pDC->GetPixel(x,y); colorNo = (int)GetRValue(color); //Then write values to file for rgb I then create another program to gather what has been writen to file and then display it. Unfortunatly what is displayed is a 'carpet like image' I understand that the return value for GetRValue is a byte so I have casted this. Can any body know why I am having problems. Is there any good programs for this? I am doing this for game purposes, eventualy I would like to get into 3d graphics what programs do the pro's do to save theirs Please can anybody enlighten me. cheers Simon
modified on Saturday, February 7, 2009 11:57 AM