I'm trying to load a JPEG through an IPicture object (OLE), and I want to somehow transform that into an RGB map. My first attempt was to get a HDC from it through the get_CurDC() method then use GetPixel() to retrieve the pixel color at a certain X and Y position in the map. However, GetPixel only returns CLR_INVALID at every call I make.
I'm pretty sure that the JPEG gets loaded properly since the get_Width() and get_Height() members returns the same dimensions as the image that was loaded.
Has anyone any suggestions?