Function

UIGraphicsEndImageContext

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

Declaration

void UIGraphicsEndImageContext(void);

Discussion

You use this function to clean up the drawing environment put in place by the UIGraphicsBeginImageContext function and to remove the corresponding bitmap-based graphics context from the top of the stack. If the current context was not created using the UIGraphicsBeginImageContext function, this function does nothing.

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

See Also

Image Creation

UIGraphicsBeginImageContext

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

UIGraphicsGetImageFromCurrentImageContext

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

UIImageJPEGRepresentation

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

UIImagePNGRepresentation

Returns a data object containing the specified image in PNG format