-(UIImage *)getResultImageFrom:(UIImageView *)imageView {
UIGraphicsBeginImageContext(CGSizeMake(imageView.bounds.size.width , imageView.bounds.size.height ));
[imageView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *result =UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return result;
}
UIImageWriteToSavedPhotosAlbum(resultImg, self, @selector(image:didFinishSavingWithError:contextInfo:), NULL);