MPlayer 비디오 결과를 TPanel
에 성공적으로 임베드했지만 TImage
에 TPanel
결과를 복사 할 수 없습니다.TPanel에 표시된 그림을 TImage로 복사
은 TPanel
정상적인 사진 TImage
로 복사된다
임베딩 배관 MPlayer는 WID 및 커맨드 라인 파라미터를 사용하여 수행된다. MPlayer는 TPanel
핸들을 사용하여 결과를 표시합니다. TImage
에
다음 미리 테스트,하지만 단지 정상 TPanel
사진 복사 :
Image1.Picture.Bitmap.Canvas.CopyRect(
Rect(0, 0, Image1.Width-1, Image1.Height-1),
TMyPanel(Panel1).Canvas, //TMyPanel is an empty class to access canvas property
Rect(0, 0, Panel1.Width-1, Panel1.Height-1)
);
이 :
Function PanelToBmp (Panel:TPanel):TBitmap;
VAR
bmp : tBitmap;
DC : HDC;
Begin
bmp := tBitmap.Create;
bmp.width := Panel.Width;
bmp.Height := Panel.Height;
DC := GetDc (Panel.Handle);
Bitblt(bmp.canvas.handle, 0, 0, Panel.Width, Panel.Height, Dc, 0, 0, NOTSRCCOPY);
Releasedc (Panel.handle,dc);
result := bmp;
End;
특히 MPlayer는 잘 모르겠지만 비디오는 조금 다르게 렌더링되며 '보통'스크린 샷을 찍을 수 없습니다. 나는 특정 매개 변수로 시작해야한다는 MPlayer에 대한 정보를 찾았습니다. 그 후에 MPlayer가 스크린 샷을 만들도록 할 수 있습니다. 어쩌면 임베디드 MPlayer에 그러한 명령을 보낼 수있는 방법이 있을까요? [this] (http://www.systutorials.com/2990/taking-screenshot-in-mplayer/) 및 [this] (http://mplayerhq.hu/pipermail/mplayer-users/2004-August/047721)를 참조하십시오. .html). – GolezTrol