http://lazarus.freepascal.org/index.php/topic,9548.msg46907.html#msg46907based on that post, copying buffer to clipboard then to image is not good,
How do we use that using TMemoryStream/OR with capGrabFrameNoStop(FCapHandle);
to
Timage?
I think this code is for?
var hd:Thandle;
jpg:TJpegImage;
memStream :TMemoryStream;
Bitmap:TBitmap;
begin
Bitmap:=TBitmap.Create;
Bitmap.Width :=BMPINFO.bmiHeader.biWidth;
// New size of Bitmap
Bitmap.Height:=BMPINFO.bmiHeader.biHeight;
hd:= DrawDibOpen; DrawDibDraw(hd,Bitmap.canvas.handle,0,0,_
BMPINFO.BmiHeader.biwidth,BMPINFO.bmiheader.biheight,_
@BMPINFO.bmiHeader,lpVHdr^.lpData,0,0,BMPINFO.bmiHeader.biWidth,_
BMPINFO.bmiHeader.biheight,0);
DrawDibClose(hd);
memStream := TMemoryStream.Create;
jpg := TJpegImage.Create;
jpg.Assign(Bitmap);
jpg.CompressionQuality := 10;
jpg.JPEGNeeded;
jpg.Compress;
jpg.SaveToStream(memStream);
jpg.Free;
http://develop.csai.cn/delphi/200611101317511617.htmthanks