iOS Guides | Samples

MonoTouch.UIKit.UIImage.AsJPEG Method

Encodes the image into a NSData byte blob using the JPEG encoding.

Syntax

public NSData AsJPEG (Single compressionQuality)

Parameters

compressionQuality
The compression quality to use, 0.0 is the maximum compression (worse quality), and 1.0 minimum compression (best quality)

Returns

The encoded image in an NSData wrapper or null if there was an error.

Remarks

This can be used from a background thread.

Requirements

Namespace: MonoTouch.UIKit
Assembly: monotouch (in monotouch.dll)
Assembly Versions: 0.0.0.0