def ifthenelse(th, el, opts = {})
      match_image = [th, el, self].find {|x| x.is_a? Vips::Image}

      unless th.is_a? Vips::Image
        th = Operation.imageize match_image, th
      end
      unless el.is_a? Vips::Image
        el = Operation.imageize match_image, el
      end

      Vips::Operation.call "ifthenelse", [self, th, el], opts
    end
def ifthenelse(th, el, opts = {})
      match_image = [th, el, self].find {|x| x.is_a? Vips::Image}

      unless th.is_a? Vips::Image
        th = Operation.imageize match_image, th
      end
      unless el.is_a? Vips::Image
        el = Operation.imageize match_image, el
      end

      Vips::Operation.call "ifthenelse", [self, th, el], opts
    end
Select pixels from `th` if `self` is non-zero and from `el` if
 `self` is zero. Use the `:blend` option to fade smoothly
 between `th` and `el`.

 @param th [Image, Real, Array<Real>] true values
 @param el [Image, Real, Array<Real>] false values
 @param opts [Hash] set of options
 @option opts [Boolean] :blend (false) Blend smoothly between th and el
 @return [Image] merged image