Hi all,
This wxWebConnect is really an exciting extension to wxWidgets users. Hope we can catch up with qt-webkit in the future.
I have tried to build and run the testapp and everything seems to work really well.
I'm now trying to find a way to render a page in the background and get the result as image data.
Does anyone have done this before or have any experience with this to share?
Can I do this with current wxWebConnect code?
Your comments are very appreciated.
Thank you very much!
Kirix Support Forums
Use wxWebConnect to render page offscreen
6 posts
• Page 1 of 1
- jerry_mouse
- Registered User
- Posts: 12
- Joined: Sat Jan 09, 2010 5:11 am
Re: Use wxWebConnect to render page offscreen
I'm also very interested in this capability. Although I haven't succeeded in getting it to work, it's possible.
Originally, I wanted to capture the image of any control, such as a button. So I tried accessing the device context of the control and transferring it to a memory device context. However, this approach failed when the control wasn't showing, and as a result, it required the control to momentarily show before the image could be captured.
I also looked into other approaches that were more specific to the browser control, and I found a Firefox add-on called Fireshot that let's you take screenshots of webpages, including both the visible and offscreen, invisible portions.
So, at some level, it's possible to render portions of the page that are offscreen, and we just need to find out what interfaces are required in order to accomplish the same thing in the wxWebConnect library.
If you are willing, please research this. I would very much like to have this capability.
Originally, I wanted to capture the image of any control, such as a button. So I tried accessing the device context of the control and transferring it to a memory device context. However, this approach failed when the control wasn't showing, and as a result, it required the control to momentarily show before the image could be captured.
I also looked into other approaches that were more specific to the browser control, and I found a Firefox add-on called Fireshot that let's you take screenshots of webpages, including both the visible and offscreen, invisible portions.
So, at some level, it's possible to render portions of the page that are offscreen, and we just need to find out what interfaces are required in order to accomplish the same thing in the wxWebConnect library.
If you are willing, please research this. I would very much like to have this capability.
Aaron Williams
Kirix Support Team
Kirix Support Team
-
Aaron - Kirix Support Team
- Posts: 120
- Joined: Fri Dec 16, 2005 3:01 pm
Re: Use wxWebConnect to render page offscreen
Hi Aaron,
I've dug into the source code of Fireshot but it seems that they write their offscreen rendering routines in a .dll, so got no luck there.
I then found OffscreenGecko from sf.net
http://sourceforge.net/projects/offscreengecko
I built and tested with prebuilt xulrunner 1.9.1.4 sdk from Mozilla and it works really well.
And now I'm digging through its source code and see if it can be integrated into wxWebConnect or not.
Hope this can help.
Regards,
I've dug into the source code of Fireshot but it seems that they write their offscreen rendering routines in a .dll, so got no luck there.
I then found OffscreenGecko from sf.net
http://sourceforge.net/projects/offscreengecko
I built and tested with prebuilt xulrunner 1.9.1.4 sdk from Mozilla and it works really well.
And now I'm digging through its source code and see if it can be integrated into wxWebConnect or not.
Hope this can help.
Regards,
- jerry_mouse
- Registered User
- Posts: 12
- Joined: Sat Jan 09, 2010 5:11 am
Re: Use wxWebConnect to render page offscreen
This looks very interesting. Have you made any progress on this? Alternatively, is there any possibility we can learn what needs to be done and simply implement equivalent functionality?
Aaron Williams
Kirix Support Team
Kirix Support Team
-
Aaron - Kirix Support Team
- Posts: 120
- Joined: Fri Dec 16, 2005 3:01 pm
Re: Use wxWebConnect to render page offscreen
Hey,
Do you guys have any solution?
I would like to use wxWebConnect, but the thumbnail image is a must.
So I would like to see if you guys have any progress yet?
Cheers
Do you guys have any solution?
I would like to use wxWebConnect, but the thumbnail image is a must.
So I would like to see if you guys have any progress yet?
Cheers
- dxj19831029
- Registered User
- Posts: 1
- Joined: Mon Mar 22, 2010 11:22 pm
Re: Use wxWebConnect to render page offscreen
After digging enough with all the related source codes out there.
I come up with this:
1. Create an offscreen chrome (container) that listens to web progress to let us know when the page is loaded completely.
2. Use nsIDOMCanvasRenderingContext2D::DrawWindow to draw the dom window on to our own canvas and extract the pixel bits in RBGA.
The result is quite good, except that it won't render plug-ins like flash...
In my case, I just need it to render html text so this is not important now.
I come up with this:
1. Create an offscreen chrome (container) that listens to web progress to let us know when the page is loaded completely.
2. Use nsIDOMCanvasRenderingContext2D::DrawWindow to draw the dom window on to our own canvas and extract the pixel bits in RBGA.
The result is quite good, except that it won't render plug-ins like flash...
In my case, I just need it to render html text so this is not important now.
- jerry_mouse
- Registered User
- Posts: 12
- Joined: Sat Jan 09, 2010 5:11 am
6 posts
· Page 1 of 1
Return to wxWebConnect Questions, Thoughts & Feedback