NSData *imagedate=UIImagePNGRepresentation(image);//将相片转化成data,当然再这里和主题无关 NSLog(@"%d",imagedate.length);//返回的是字节数 UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:didFinishSavingWithError:contextInfo:), @"liyang");//这个方法的作用是写到相册里面,下面那个是回调方法 - (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo{ NSLog(@"%@",error); NSLog(@"%@",contextInfo); }