How to display a captured bitmap?

How to display a captured bitmap?

Post by gigi » Sun, 15 Jun 2003 20:48:27



Hi
I want to display a bitmap image, captured with a web cam, on a TImage
component.
I wrote this piece of code but the image is not displayed...
I must use Windows SDK routines.

Thanx in advance

  HDC hdc = GetDC(Image1->Canvas->Handle);    //hdc is the DC handle of the
Image1 (TImage type)
  HDC hmem = CreateCompatibleDC(hdc);
  OpenClipboard(0);
  HBITMAP imm = GetClipboardData(CF_BITMAP);
  BITMAP bm;
  GetObject(imm,sizeof(BITMAP),(LPSTR)&bm);
  HBITMAP hbitmap = CreateCompatibleBitmap(hdc,bm.bmWidth,bm.bmHeight);
  SelectObject(hmem,hbitmap);
  BitBlt(hmem,0,0,bm.bmWidth,bm.bmHeight,hdc,0,0,SRCCOPY);
  SelectObject(hdc,hbitmap);
  BitBlt(hdc,0,0,bm.bmWidth,bm.bmHeight,hmem,0,0,SRCCOPY);

 
 
 

1. Displaying a Bitmap or Delphi-Form on external gr-display

I would like to display a bitmap or even an entire form
or perhaps the entire program on an external graphic LCD,
monochrome or color.

I have been considering a very expensive LCD (S)VGA
screen. Perhaps a TV-output graphics card and a video monitor.

The idea is to have a small display accessible by the
the user, and place the computer elsewhere. The problem
is I want it to be small and still useful, and not too expensive.

Doens anybody have any ideas on how to do this.

Anders Johansson

2. Win Media Studio Pro or Aura!

3. Wanted: utilty to capture display file

4. SIGGRAPH '92 Roommate needed

5. Studio Video Capture/Display System

6. Transistor Design makes great webpages @ http://www.mica.edu/bchesley

7. HELP: Guaranteeing screen update before bitmap capture

8. How do I ..... ?

9. Problems with display 16 color captured images

10. Wanted: "Standard Unix" image capture/display

11. wanted: ability to capture color X display and convert to greyscale Postscript

12. The easiest way to capture and display 3D stereoscopic movies and pictures

13. Capturing a video game's display