Following is the usual way to create a CGBitmapContext and at its creation we set the context bounds.
CGContextRef contextbitmap = CGBitmapContextCreate(NULL, width, height,8,
4 * width,
devicecolorspace,
kCGImageAlphaPremultipliedFirst);
I am looking for way to update the bounds of context?
You can’t. Create a new bitmap context. You can transfer the old one’s contents to the new one by creating an image from it (
CGBitmapContextCreateImage) and then drawing that image into the new context.