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-3.0.4 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-3.0.3 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-3.0.2 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-3.0.1 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-3.0.0 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-2.12.3 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-2.12.2 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-2.12.1 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-2.12.0 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-2.11.1 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-2.11.0 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-2.10.0 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-2.9.1 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-2.8.2 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-2.8.1 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-2.8.0 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-2.7.1 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-2.7.0 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-2.6.0 lib/ios/sugarcube-nsdata/uiimage.rb
sugarcube-2.5.0 lib/ios/sugarcube-nsdata/uiimage.rb