Вниз
Скачать: CL | DM;

Корректное снятие видео при копировании образа экрана   Найти похожие ветки 

← →
dmitry_12_08_74   (2008-03-11 14:26) [0]

Если во время копирования образа экрана запущен Media Palyer во время показа им видео, на снимке образа экрана вместо кадра из фильма останется чёрное пустое место. Как корректно скопировать кадр?

Сейчас копирую образ экрана с помощью процедуры из библиотеки jcl_&_jvcl, модуль JclGraphics:

procedure ScreenShot(bm: TBitmap; Left, Top, Width, Height: Integer; Window: THandle); overload;
var
 WinDC: HDC;
 Pal: TMaxLogPalette;
begin
 bm.Width := Width;
 bm.Height := Height;

 // Get the HDC of the window...
 WinDC := GetDC(Window);
 if WinDC = 0 then
   raise EJclGraphicsError.CreateRes(@RsNoDeviceContextForWindow);

 // Palette-device?
 if (GetDeviceCaps(WinDC, RASTERCAPS) and RC_PALETTE) = RC_PALETTE then
 begin
   FillChar(Pal, SizeOf(TMaxLogPalette), #0);  // fill the structure with zeros
   Pal.palVersion := $300;                     // fill in the palette version

   // grab the system palette entries...
   Pal.palNumEntries := GetSystemPaletteEntries(WinDC, 0, 256, Pal.palPalEntry);
   if Pal.PalNumEntries <> 0 then
     bm.Palette := CreatePalette(PLogPalette(@Pal)^);
 end;

 // copy from the screen to our bitmap...
 BitBlt(bm.Canvas.Handle, 0, 0, Width, Height, WinDC, Left, Top, SRCCOPY);

 ReleaseDC(Window, WinDC);        // finally, relase the DC of the window
end;


← →
DVM ©   (2008-03-11 14:40) [1]

там оверлей используется поэтому и не получается



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.042 c
15-1274156230
юзер_пузер
2010-05-18 08:17
2010.08.27
flash &amp; ActionScript 3


15-1268947805
Юрий
2010-03-19 00:30
2010.08.27
С днем рождения ! 19 марта 2010 пятница


6-1217494891
laao
2008-07-31 13:01
2010.08.27
Как получить детали отклоненного запроса - IdHTTPServer+OpenSSL ?


15-1267771411
oxffff
2010-03-05 09:43
2010.08.27
Буду в Москве с 22.03 по 26.03. Был бы рад встрече.


2-1273677448
Михаил
2010-05-12 19:17
2010.08.27
компонент RichEdit




   Наверх