Function

UIGraphicsBeginImageContext

Creates a bitmap-based graphics context and makes it the current context.

Declaration

void UIGraphicsBeginImageContext(CGSize size);

Parameters

size

The size of the new bitmap context. This represents the size of the image returned by the UIGraphicsGetImageFromCurrentImageContext function.

Discussion

This function is equivalent to calling the UIGraphicsBeginImageContextWithOptions function with the opaque parameter set to NO and a scale factor of 1.0.

This function may be called from any thread of your app.

See Also

Image Creation

UIGraphicsGetImageFromCurrentImageContext

Returns an image based on the contents of the current bitmap-based graphics context.

UIGraphicsEndImageContext

Removes the current bitmap-based graphics context from the top of the stack.

UIImageJPEGRepresentation

Returns a data object containing the specified image in JPEG format.

UIImagePNGRepresentation

Returns a data object containing the specified image in PNG format