2 Replies Latest reply on Feb 2, 2009 2:39 PM by AIF Bob

    PixelBender tint filter question

    crzymnmchl
      Don't mean to cross-post but after posting to flexCoders thought it might be better here :-)

      This one is making my head hurt ... will there be any perceivable
      difference in

      a) slowly changing an object's color from it's current color e.g.
      0xFF0000 to 0xFF9999

      and

      b) slowly changing the object's color by morphing the correct
      individual r, g and b from 0xFF0000 to 0XFF9999?

      Will it pass through the same shades on the way from current to new?
      Reason I wonder is that I am looking at some PixelBlender filters that
      change the tint of objects by manipulating the r,g,b components.... is
      this different to just changing the color attribute ? And then I thought ... I am applying this PixelBender filter to bitmaps - and it changes each pixel of the bitmap - maybe there is no color attribute to a pixel and you have to do the r,g,b separately? Still learning :-)

      Mic.
        • 1. Re: PixelBender tint filter question
          crzymnmchl Level 1
          Looking through PixelBlender docs and there is a color attribute for a pixel ... so very interested in replies :-)

          Mic.
          • 2. Re: PixelBender tint filter question
            AIF Bob Level 3
            This is one of those questions where I think it's easier just to demonstrate what's going on. Here's a simple filter that lets you morph the red and green channels of an image:

            There are a couple of things to note. All color values run from 0.0 to 1.0 - they're floating point numbers. You can operate on individual channels of a pixel. Remember that the filter is producing a single output pixel - in this case, it's just using the value from the corresponding input pixel and changing its color.