Upravit

Sdílet prostřednictvím


UIImage.AsJPEG Method

Definition

Overloads

AsJPEG()

Encodes the image with minimal compression (maximum quality) into a NSData byte blob using the JPEG encoding.

AsJPEG(nfloat)

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

AsJPEG()

Encodes the image with minimal compression (maximum quality) into a NSData byte blob using the JPEG encoding.

public Foundation.NSData AsJPEG ();
member this.AsJPEG : unit -> Foundation.NSData

Returns

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

Remarks

This can be used from a background thread.

Applies to

AsJPEG(nfloat)

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

public Foundation.NSData AsJPEG (nfloat compressionQuality);
member this.AsJPEG : nfloat -> Foundation.NSData

Parameters

compressionQuality
nfloat

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.

Applies to