Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to capture the Desktop Window into a jpeg image?
Message
 
À
07/11/2003 15:00:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Divers
Thread ID:
00847508
Message ID:
00847978
Vues:
31
Hi Peter,

I'll try to answer on your questions.

>It seems to me that the Capture method is using BitBlt to capture the image of the Desktop, which I believe is considered as a bitmap, to a newly created bitmap.

Yes, but we have not access to desktop bitmap directly. We have only device context of the desktop and BitBlt copies data from source device context to destination device context (with selected bitmap object). It's a common way to capture window to bitmap.

> 1. Can we just encode the Desktop into JPEG directly?

No. Desktop is not a bitmap. We have to capture it to bitmap first. Also, there no WinAPI (at least, documented) to save JPEGs. We can make it only with GDI+ or some third-party libraries like Intel JPEG Library.

> 2. What is the difference between the source bitmap and destination bitmap used by the BitBlt function?

BitBlt works with device contexts, not bitmaps. In order to obtain direct access to screen content were developed such things as DirectDraw.

> 3. Why do we need to create another bitmap using GdipCreateBitmapFromHBITMAP?

Actually it is not another bitmap, It's a GDI+ object based on GDI object (HBITMAP). We must have GDI+ object, because GDI+ is used for JPEG encoding.

> 4. Does HBITMAP always stand for handle of a bitmap?

Yes, HBITMAP is a GDI handle of bitmap.

Alexander
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform