Share via


UIImage.AsJPEG Method

Definition

Overloads

Name Description
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(System.Runtime.InteropServices.NFloat compressionQuality);
member this.AsJPEG : System.Runtime.InteropServices.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