Method: Magick::Image#matte_point

Defined in:
lib/rmagick_internal.rb

#matte_point(x, y) ⇒ Object

Make the pixel at (x,y) transparent.



929
930
931
932
933
934
935
936
# File 'lib/rmagick_internal.rb', line 929

def matte_point(x, y)
  f = copy
  f.alpha(OpaqueAlphaChannel) unless f.alpha?
  pixel = f.pixel_color(x, y)
  pixel.alpha = TransparentAlpha
  f.pixel_color(x, y, pixel)
  f
end