Method: Magick::Image#matte_replace

Defined in:
lib/RMagick.rb

#matte_replace(x, y) ⇒ Object

Make transparent all pixels that are the same color as the pixel at (x, y).



951
952
953
954
955
956
# File 'lib/RMagick.rb', line 951

def matte_replace(x, y)
    f = copy
    f.opacity = OpaqueOpacity unless f.matte
    target = f.pixel_color(x, y)
    f.transparent(target)
end