Method: CIImage#uiimage

Defined in:
lib/sugarcube-image/ciimage.rb

#uiimage(scale = nil, orientation = nil) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/sugarcube-image/ciimage.rb', line 3

def uiimage(scale=nil, orientation=nil)
  if scale && orientation
    return UIImage.imageWithCIImage(self, scale: scale, orientation: orientation)
  elsif scale && scale.is_a?(UIImage)
    return UIImage.imageWithCIImage(self, scale: scale.scale, orientation: scale.imageOrientation)
  else
    return UIImage.imageWithCIImage(self)
  end
end