Sha256: ee95d3d603bbc987acfa08a09cb3396cb841f1c4ac32b7fd2538c231111a2ae8

Contents?: true

Size: 280 Bytes

Versions: 89

Compression:

Stored size: 280 Bytes

Contents

class UIImage

  # @return [NSData] an NSData object in PNG or JPG format
  def nsdata(format=:png, compression=0.9)
    case format
    when :png, :PNG
      UIImagePNGRepresentation(self)
    when :jpg, :JPG
      UIImageJPEGRepresentation(self, compression)
    end
  end

end

Version data entries

89 entries across 89 versions & 1 rubygems

Version Path
sugarcube-4.0.0 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-3.5.0 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-3.4.2 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-3.4.1 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-3.4.0 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-3.3.7 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-3.3.6 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-3.3.5 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-3.3.4 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-3.3.3 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-3.3.2 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-3.3.1 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-3.3.0 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-3.2.0 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-3.1.1 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-3.1.0 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-3.0.8 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-3.0.7 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-3.0.6 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-3.0.5 lib/ios/sugarcube-nsdata/uiimage.rb