Peter,
>3. GDI has no function to save bitmap into a JPEG format. For curiosity, how to save the GDI object (bitmap) into a bmp file using GDI (not GDI+)?
This could be done with poorly documented OleSavePictureFile() function. The sample you can find in message #
754817. The more complex way you can see in George Tasker's Obj2Bmp code, for example.
>4. GdipCreateBitmapFromHBITMAP is used to create a GDI+ object (image) from a GDI object (bitmap). This is necessary because GdipSaveImageToFile only supports GDI+ object. Where can I find more information on these functions besides the very limited info in MSDN?
I know only only one "good" place - GdiPlusFlat.h file in Platform SDK.
>One concern I have using GdipCreateBitmapFromHBITMAP and GdipSaveImageToFile is that they are not supported by Microsoft Product Support Services. In the link
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdicpp/GDIPlus/GDIPlusReference/FlatBitmap.asp, it mentions that we should use C++ wrappers.
Yes, GDI+ is announced evewhere as a set of C++ classes. However they are just wrappers around GDI+ API. These classes make development in C++ more clear and robust, but in VFP we have to call API functions directly.
>I have no idea how to do that in VFP.
Just use gpImage class. This code from capture.prg sample will make the job without learning the GDI, GDI+, WinAPI, C++ and World's history of humanity :) :
If Not "gpImage" $ Set("Procedure")
Set Procedure To gpImage Additive
EndIf
gdip = CreateObject("gpInit")
img = CreateObject("gpImage")
img.Capture(0)
img.SaveAsJPEG("Desktop")