Well, You could always temporarily save on disk the image in the wanted format, and then read its content and delete the file:
http://msdn.microsoft.com/en-us/libr...=vs.90%29.aspx