alpha buffer

Do not post support requests, bug reports or feature requests. Discuss CEF here. Non-CEF related discussion goes in General Discussion!

alpha buffer

Postby Jonas » Thu Jul 10, 2014 2:32 pm

Is it possible to render an RGBA image in the embedded browser and then get the buffer as RGBA in my application?

In other words, if I were to render an image with transparency in Chrome and then grab the buffer from an external Windows application, the buffer would be flattened into RGB. Alpha is lost, I believe. I would like to get RGB and A.
Jonas
Techie
 
Posts: 39
Joined: Thu Jul 10, 2014 2:23 pm

Re: alpha buffer

Postby magreenblatt » Thu Jul 10, 2014 3:27 pm

You can use off-screen rendering which supports alpha transparency. With off-screen rendering you create a browser that renders to a pixel buffer instead of a window. For example, run cefclient with the "--off-screen-rendering-enabled --transparent-painting-enabled" command-line flags and see the usage of CefRenderHandler.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: alpha buffer

Postby DusX » Thu Aug 14, 2014 2:50 pm

I am bumping up this thread because its related to what I want to know.

Is it possible to render off screen using GPU acceleration?
And if so Imagine that would also support alpha?

I found information that it was not in the past, but much time has passed?
DusX
Newbie
 
Posts: 1
Joined: Thu Aug 14, 2014 2:44 pm

Re: alpha buffer

Postby magreenblatt » Fri Aug 15, 2014 4:25 am

magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: alpha buffer

Postby elliscope » Thu Jun 04, 2015 1:56 pm

Following the first post from Jonas, I was able to get singular buffer that contains alph info of each pixel by doing things similar to screen shoot and example here viewtopic.php?f=11&t=881&p=3509&hilit=null+hwnd#p3509. However, will I be able to get access to the alph value of buffer that's get rendered 60 times a second(similar to requestAnimation in HTML 5) ? Repeat screen shoot process 60 times a second for rendering buffer might work, but I'm wondering is it possible for me to get the buffer directly from browser handler and build an off screen app?
elliscope
Newbie
 
Posts: 1
Joined: Thu Jun 04, 2015 1:44 pm


Return to CEF Discussion

Who is online

Users browsing this forum: No registered users and 30 guests