How to apply CoreImage effects to windows?

  • CoreImage is great for creating effects for images, but I wonder if
    there's a smart way of applying those effect directly to
    views/windows? For example, can I make my window appear blurred, or
    bloomed, so that all child controls also appear  blurred/bloomed, but
    still keep working. I mean, as I hover and click the child controls,
    all their interactive states and animations should be drawn with the
    blurred/bloomed effect. I've seen an example of this: HUD windows in
    Pixelmator blur windows behind them dynamically, so I assume it's
    possible, but have no idea how to do this.

    One of the first solutions that comes to mind is to create a
    screenshot of the window, apply the CI effect to it, and show it on
    top the window, but it's not going to change dynamically with the
    interactions. Also, there are going to be transparency issues with
    this approach if the window is translucent.

    Another related question is how the ripple effect of the Dashboard
    works. I have noticed that when the windows behind the ripples are
    showing some animation (or video), they keep showing it dynamically
    under the ripples as they are going! How is this possible? The
    CoreImage only work with static images (or QT video, but that's not
    the case), I have no idea how they achieved this effect with the
    source image being dynamically updated.
  • Well, I have found the CGSAddWindowFilter undocumented private
    function that does the trick of applying various CoreImage effects to
    windows. See http://code.google.com/p/undocumented-goodness/

    However, the transition effects (such as CIRippleTransition) do not
    seem to work this way, or I don't know how to set them up correctly.

    If anyone has an idea how to use the transition filters on windows,
    please advise!

    Also, I've found that stacking filters by calling CGSAddWindowFilter
    multiple times does not work either(or again, I don't know how to set
    it up correctly). Any information is welcome in this regard. (This
    problem can be solved however by creating several transparent windows,
    each one with a single effect.)

    On Fri, Feb 20, 2009 at 10:12 AM, Oleg Krupnov <oleg.krupnov...> wrote:
    > CoreImage is great for creating effects for images, but I wonder if
    > there's a smart way of applying those effect directly to
    > views/windows? For example, can I make my window appear blurred, or
    > bloomed, so that all child controls also appear  blurred/bloomed, but
    > still keep working. I mean, as I hover and click the child controls,
    > all their interactive states and animations should be drawn with the
    > blurred/bloomed effect. I've seen an example of this: HUD windows in
    > Pixelmator blur windows behind them dynamically, so I assume it's
    > possible, but have no idea how to do this.
    >
    > One of the first solutions that comes to mind is to create a
    > screenshot of the window, apply the CI effect to it, and show it on
    > top the window, but it's not going to change dynamically with the
    > interactions. Also, there are going to be transparency issues with
    > this approach if the window is translucent.
    >
    > Another related question is how the ripple effect of the Dashboard
    > works. I have noticed that when the windows behind the ripples are
    > showing some animation (or video), they keep showing it dynamically
    > under the ripples as they are going! How is this possible? The
    > CoreImage only work with static images (or QT video, but that's not
    > the case), I have no idea how they achieved this effect with the
    > source image being dynamically updated.
    >
previous month february 2009 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28  
Go to today