def mask(color1 = nil)
      color1 = color1 || Color.from_rgb(255,255,255)
      color2 = color1.dup
      color2.a = 0

      color_replace(color1,color2)
    end
def mask(color1 = nil)
      color1 = color1 || Color.from_rgb(255,255,255)
      color2 = color1.dup
      color2.a = 0

      color_replace(color1,color2)
    end
Replace a color with %100 transparency, useful for mask drawing

 Example

   masked = other_image.mask(Color.black)
   image.draw(0,0,masked) # draw the image without the black pixels