getbitmapframe technique

F-IN-BOX for Delphi / Builder C++ / VCL
flegel
Posts: 12
Joined: Wed Mar 21, 2007 1:59 pm

getbitmapframe technique

Postby flegel » Fri Mar 23, 2007 5:49 am

Hello,

I saw your component and actually it's just what I was looking for
for a possible future project (in Delphi).
I need to render flash frames (offscreen), and show it (for example)
in a DirectX texture. I saw such an example code piece in the forums
with 'FlashPlayerControl1.CreateFrameBitmap' and / or 'SFPCGetFrameBitmap'.

I was wondering what technique is used 'under the hood' to get the
flash-frames, and what is exactly needed.
Is the technique a win32 api snapshot / screenshot of the desktop or window?
Or is it done in another way, with some flash SDK function or something?

Also, is it necessary to have a active / visible window (TForm) to render
the fame on? Or dont you need a window / TForm and can it be done completely
'offscreen'?

Regards,
Martin

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Re: getbitmapframe technique

Postby Softanics » Fri Mar 23, 2007 8:54 am

Thank you for your questions.

flegel wrote:I saw your component and actually it's just what I was looking for
for a possible future project (in Delphi).
I need to render flash frames (offscreen), and show it (for example)
in a DirectX texture. I saw such an example code piece in the forums
with 'FlashPlayerControl1.CreateFrameBitmap' and / or 'SFPCGetFrameBitmap'.


SFPCGetFrameBitmap is for DLL Edition. CreateFrameBitmap is for Delphi Edition.

flegel wrote:I was wondering what technique is used 'under the hood' to get the
flash-frames, and what is exactly needed.
Is the technique a win32 api snapshot / screenshot of the desktop or window?
Or is it done in another way, with some flash SDK function or something?


CreateFrameBitmap sends some windows message to a flash movie and than works with result.

flegel wrote:Also, is it necessary to have a active / visible window (TForm) to render
the fame on? Or dont you need a window / TForm and can it be done completely
'offscreen'?


Yes, you need a window. In your task, you just hide it.
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

flegel
Posts: 12
Joined: Wed Mar 21, 2007 1:59 pm

Postby flegel » Mon Apr 02, 2007 10:00 am

Windows messages, ok.

But do those windows messages make a 'screenshot' of a window
or are all pixels get via some api, read line by line / pixel for pixel ?

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Mon Apr 02, 2007 10:38 am

flegel wrote:But do those windows messages make a 'screenshot' of a window
or are all pixels get via some api, read line by line / pixel for pixel ?


Something like making a screenshot. TFlashPlayerControl.CreateFrameBitmap returns a GDI bitmap, so to get access to particular pixels, you should call winapi function GetDIBits or something like.
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html


Return to “Delphi / Builder / VCL Edition”

Who is online

Users browsing this forum: No registered users and 21 guests