removed the memory Leak because of UIGraphicsBeginImageContext twice.