Jump to content

LiveView display of camera screen

Recommended Posts

I am completely new to AutoIt and am having problems trying to display a LiveView of the camera screen.

via a PTP link, I can download a bitmap image of the screen into an AutoIt structure.

For use with gdi functions, I need a handle to the bitmap.

I have not been able to discover what the HBITMAP structure consists of but based on code in

BMP3.au3 I have :-

Local $BMPHandle[4]                             
         $BMPHandle[3]= DllStructCreate("ubyte[230454]")

If I save $BMPHandle[3] to a file it is indeed a bitmap.

Is $BMPHandle a genuine HBITMAP ?

If so, this attempt to copy a bitmap object (the above) to a graphic object (a window) does not work :

$hBitmap = _GDIPlus_BitmapCreateFromHBITMAP ($BMPHandle)
   _GDIPlus_GraphicsDrawImage ($hGraphic, $hBitmap, 0, 0)


$hGraphic = _GDIPlus_GraphicsCreateFromHWND ($hSDMWindow )

Any ideas ?

I have no idea if AutoIt (or gdi+) will be fast enough for an update-rate of say ten frames per second.

Link to post
Share on other sites
  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...