Loading ...
Sorry, an error occurred while loading the content.

Re: [svg-developers] Filtering out a specific color from an image?

Expand Messages
  • Marty Sullivan
    Or perhaps I could do this with a instead? ... [Non-text portions of this message have been removed]
    Message 1 of 4 , Oct 10, 2012
    • 0 Attachment
      Or perhaps I could do this with a <mask> instead?

      On Wed, Oct 10, 2012 at 9:44 AM, dark3251 <dark3251@...> wrote:

      > **
      >
      >
      > I am trying to figure out if there would be a way to apply a filter to an
      > image that would filter a specific color and change it. For example, let's
      > say I wanted to apply a filter that would take any pure blue pixels and
      > change its alpha to 0 making it transparent.
      >
      > I've been looking at the feColorMatrix and/or feComponentTransfer but I'm
      > not sure if this could be done with those. Another idea that crossed my
      > mind was feComposite by loading in a pure transparent image and then taking
      > the image to be filtered and somehow making the composite result change
      > just the color I'm looking for.
      >
      > Anyone have any ideas here? It seems like I should be capable of doing
      > this somehow.
      >
      >
      >


      [Non-text portions of this message have been removed]
    • Marty Sullivan
      I have gotten gotten this to work. Basically, I generated a png that had the areas of the image (a jpeg in this case) that contain the color to change as black
      Message 2 of 4 , Oct 11, 2012
      • 0 Attachment
        I have gotten gotten this to work. Basically, I generated a png that had
        the areas of the image (a jpeg in this case) that contain the color to
        change as black pixels and all other areas as transparent pixels. Then I
        did an feComposite using the xor operator on the two images. Success!
        although only useful in very limited circumstances, this was a fun thing to
        figure out.

        On Wed, Oct 10, 2012 at 12:09 PM, Marty Sullivan <dark3251@...> wrote:

        > Or perhaps I could do this with a <mask> instead?
        >
        >
        > On Wed, Oct 10, 2012 at 9:44 AM, dark3251 <dark3251@...> wrote:
        >
        >> **
        >>
        >>
        >> I am trying to figure out if there would be a way to apply a filter to an
        >> image that would filter a specific color and change it. For example, let's
        >> say I wanted to apply a filter that would take any pure blue pixels and
        >> change its alpha to 0 making it transparent.
        >>
        >> I've been looking at the feColorMatrix and/or feComponentTransfer but I'm
        >> not sure if this could be done with those. Another idea that crossed my
        >> mind was feComposite by loading in a pure transparent image and then taking
        >> the image to be filtered and somehow making the composite result change
        >> just the color I'm looking for.
        >>
        >> Anyone have any ideas here? It seems like I should be capable of doing
        >> this somehow.
        >>
        >>
        >>
        >
        >


        [Non-text portions of this message have been removed]
      • David Dailey
        In http://cs.sru.edu/~ddailey/svg/feTurbulence19.svg (working in FF and Opera) I simply used feComponentTransfer to discretize the blue channel. Not exactly
        Message 3 of 4 , Oct 11, 2012
        • 0 Attachment
          In http://cs.sru.edu/~ddailey/svg/feTurbulence19.svg (working in FF and
          Opera) I simply used feComponentTransfer to discretize the blue channel. Not
          exactly what you wanted, but along those lines. Combining with feColorMatrix
          seems like the way to go. feComposite can certainly help too, as in
          http://cs.sru.edu/~ddailey/svg/feComposite4.svg

          Cheers
          David

          -----Original Message-----
          From: svg-developers@yahoogroups.com [mailto:svg-developers@yahoogroups.com]
          On Behalf Of Marty Sullivan
          Sent: Thursday, October 11, 2012 2:35 PM
          To: svg-developers@yahoogroups.com
          Subject: Re: [svg-developers] Filtering out a specific color from an image?

          I have gotten gotten this to work. Basically, I generated a png that had the
          areas of the image (a jpeg in this case) that contain the color to change as
          black pixels and all other areas as transparent pixels. Then I did an
          feComposite using the xor operator on the two images. Success!
          although only useful in very limited circumstances, this was a fun thing to
          figure out.

          On Wed, Oct 10, 2012 at 12:09 PM, Marty Sullivan <dark3251@...> wrote:

          > Or perhaps I could do this with a <mask> instead?
          >
          >
          > On Wed, Oct 10, 2012 at 9:44 AM, dark3251 <dark3251@...> wrote:
          >
          >> **
          >>
          >>
          >> I am trying to figure out if there would be a way to apply a filter
          >> to an image that would filter a specific color and change it. For
          >> example, let's say I wanted to apply a filter that would take any
          >> pure blue pixels and change its alpha to 0 making it transparent.
          >>
          >> I've been looking at the feColorMatrix and/or feComponentTransfer but
          >> I'm not sure if this could be done with those. Another idea that
          >> crossed my mind was feComposite by loading in a pure transparent
          >> image and then taking the image to be filtered and somehow making the
          >> composite result change just the color I'm looking for.
          >>
          >> Anyone have any ideas here? It seems like I should be capable of
          >> doing this somehow.
          >>
          >>
          >>
          >
          >


          [Non-text portions of this message have been removed]



          ------------------------------------

          -----
          To unsubscribe send a message to: svg-developers-unsubscribe@yahoogroups.com
          -or-
          visit http://groups.yahoo.com/group/svg-developers and click "edit my
          membership"
          ----Yahoo! Groups Links
        Your message has been successfully submitted and would be delivered to recipients shortly.