Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to use css filters for this? #12

Closed
balupton opened this issue Jan 26, 2014 · 3 comments
Closed

Is it possible to use css filters for this? #12

balupton opened this issue Jan 26, 2014 · 3 comments

Comments

@balupton
Copy link
Contributor

I'm wondering if canvas can somehow grab the output of a css filter? As css filters are really powerful and really simplistic — interconnectapp/discuss#21

But perhaps one day, we can have our npm filters just as powerful, so we could do things like this:

processor.filters = [
  require('rtc-filter-grayscale')(0.5),
  require('rtc-filter-brightness')(9),
  require('rtc-filter-contrast')(9)
]
@DamonOehlman
Copy link
Owner

I'm not sure Ben - it seems unlikely but definitely worth investigating.

@DamonOehlman
Copy link
Owner

Hey Ben - I just revisited this issue and checked whether I could draw a video that had a CSS filter applied into a canvas, and see the effects of the filter applied in the drawn canvas data. As I suspected it's the original (unfiltered) image data that is drawn into the canvas, which means that CSS filter is applied after any current raster processing that is being applied for video / image / canvas elements.

@silviapfeiffer
Copy link

I don't think it's possible (also see http://stackoverflow.com/questions/13491038/save-a-canvas-with-css3-filters-applied-as-an-image for a discussion about this).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants