Вниз
Скачать: 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.049 c
2-1267885769
Mer01
2010-03-06 17:29
2010.08.27
Как задать массив Record при инициализации?


15-1274076594
Anatoly Podgoretsky
2010-05-17 10:09
2010.08.27
Выбор писалки DVD


2-1275776869
akosh12345
2010-06-06 02:27
2010.08.27
Динамическая память


2-1274176896
St.Anger
2010-05-18 14:01
2010.08.27
Двумерный динамический массив


4-1237105273
Дмитрий
2009-03-15 11:21
2010.08.27
Класс диалогового окна




   Наверх