Speed up bitmap getting

DLL Edition of the F-IN-BOX
Zeratul
Posts: 24
Joined: Sat Apr 01, 2006 8:19 am

Postby Zeratul » Mon Apr 03, 2006 9:35 am

If i will not get image every frame, the animation will not be smooth.

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

Postby Softanics » Mon Apr 03, 2006 9:49 am

Zeratul wrote:If i will not get image every frame, the animation will not be smooth.


Yes, it just plays.
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

Zeratul
Posts: 24
Joined: Sat Apr 01, 2006 8:19 am

Postby Zeratul » Mon Apr 03, 2006 9:54 am

Ok. And what about callback function or function of getting direct access to image buffer for a simple bitmap(RGB) ? Will it be completed on this week ?

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

Postby Softanics » Mon Apr 03, 2006 10:00 am

Zeratul wrote:Ok. And what about callback function or function of getting direct access to image buffer for a simple bitmap(RGB) ? Will it be completed on this week ?


I hope, yes.
Best regards, Artem A. Razin,

F-IN-BOX support

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

Zeratul
Posts: 24
Joined: Sat Apr 01, 2006 8:19 am

Postby Zeratul » Tue Apr 04, 2006 7:56 pm

Can you write a small part of code, how to get only RGB bitmap via the same technique as used for alpha bitmaps, while you have no ability to get direct access?

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

Postby Softanics » Wed Apr 05, 2006 7:23 am

Zeratul wrote:Can you write a small part of code, how to get only RGB bitmap via the same technique as used for alpha bitmaps, while you have no ability to get direct access?


Code: Select all

m_hwndFlashPlayerControl =
   CreateWindow(WC_FLASH,
                         NULL,
                         WS_CHILD | WS_VISIBLE,
                         rc.left,
                         rc.top,
                         rc.right - rc.left,
                         rc.bottom - rc.top,
                         m_hWnd,
                         NULL,
                         NULL,
                         NULL);

...

SFPCGetFrameBitmap FPCGetFrameBitmap = { 0 };

SendMessage(m_hwndFlashPlayerControl, FPCM_GET_FRAME_BITMAP, 0, (LPARAM)&FPCGetFrameBitmap);

HBITMAP hBitmap = FPCGetFrameBitmap.hBitmap;

DeleteObject(hBitmap);


But you can't get access to pixels using GetObject.
Best regards, Artem A. Razin,

F-IN-BOX support

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

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

Postby Softanics » Wed Apr 05, 2006 12:53 pm

Please see example:
http://www.flashplayercontrol.com/TEMP/FPCNPaint.zip

Before building download last version of the DLL:
http://www.flashplayercontrol.com/downl ... rolDLL.zip
Best regards, Artem A. Razin,

F-IN-BOX support

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

Zeratul
Posts: 24
Joined: Sat Apr 01, 2006 8:19 am

Postby Zeratul » Thu Apr 06, 2006 7:48 am

Thanks. I will check it.

Zeratul
Posts: 24
Joined: Sat Apr 01, 2006 8:19 am

Postby Zeratul » Mon Apr 10, 2006 7:59 am

Thanks! It is working very fast. But still there is a problem with using it. How can I create flash control without window(or hidden). When the game started, it will not be nice, to have a lot of additional windows on the screen, which are playing flash movies.
Last edited by Zeratul on Mon Apr 10, 2006 8:19 am, edited 1 time in total.

Zeratul
Posts: 24
Joined: Sat Apr 01, 2006 8:19 am

Postby Zeratul » Mon Apr 10, 2006 8:08 am

Can it work the same way as with transparent images? but callback will return RGB images of course. Because there are no real benefits if it is impossible.

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

Postby Softanics » Mon Apr 10, 2006 8:56 am

Zeratul wrote:Thanks! It is working very fast. But still there is a problem with using it. How can I create flash control without window(or hidden). When the game started, it will not be nice, to have a lot of additional windows on the screen, which are playing flash movies.


Yes, I understand the problem. When FPC is a hidden window, the notification FPCN_PAINT doesn't work. It will be fixed in the nearest time (tomorrow, I hope). I will post here about the update.
Thank you.
Best regards, Artem A. Razin,

F-IN-BOX support

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

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

Postby Softanics » Mon Apr 10, 2006 9:02 am

Zeratul wrote:Can it work the same way as with transparent images? but callback will return RGB images of course. Because there are no real benefits if it is impossible.


For what you need the transparent image? May be you just want to draw flash with alpha channel to a HDC? I can add the method for that. It will be faster than getting a bitmap with alpha channel.
Best regards, Artem A. Razin,

F-IN-BOX support

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

Zeratul
Posts: 24
Joined: Sat Apr 01, 2006 8:19 am

Postby Zeratul » Mon Apr 10, 2006 9:51 am

No. Well. I will describe what I need from this flash player control.

1. No other windows on the screen. They can be hidden or course. But they must not be visible.
2. Every frame get buffer with pixels(for smooth animations). It will be much better If it will be possible to get pixels buffer through some functions, but not through callbacks. Something like: GetLastFrameImage
Because if FPS in flash object will be more then in application, it will slow down the application, because the only thing the application will do in this case is updating frames, not internal processes. This problem appears when dealing with large flash movie playing(I mean full screen). I just tested this.
3. RGB buffer support.

If we will get all of this features, then we will obtain a site license.

1. You promise to do this tomorrow.
2. Will be very good, but I don't know, can you make this or not.
3. It is already supported.
So just 1 and 2 left.

Thats all.

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

Postby Softanics » Tue Apr 11, 2006 8:05 am

Please download updated example:
http://www.flashplayercontrol.com/TEMP/FPCNPaint1.zip
The updated dll is in the this zip (in the Debug folder).
Best regards, Artem A. Razin,

F-IN-BOX support

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

Zeratul
Posts: 24
Joined: Sat Apr 01, 2006 8:19 am

Postby Zeratul » Tue Apr 11, 2006 10:36 am

Well. It is working good now. Thanks! But about new version of control ? I mean in download section it is still old. When new one will be added ?


Return to “DLL Edition”

Who is online

Users browsing this forum: No registered users and 20 guests

cron