gpt4 book ai didi

ios - CGImageCreateWithImageProvider:无效的图像尺寸:180 x 180

转载 作者:行者123 更新时间:2023-12-01 16:49:25 25 4
gpt4 key购买 nike

我在设备上运行我的应用时遇到以下错误(我没有在模拟器中运行它):

CGImageCreateWithImageProvider`:无效的图片尺寸:180 x 180。

- (IBAction)choosePic:(id)sender {
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
self.imageOne = [[UIImagePickerController alloc] init];
self.imageOne.sourceType = UIImagePickerControllerSourceTypeCamera;
self.imageOne.delegate = self;
}
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) {
self.imageOne = [[UIImagePickerController alloc] init];
self.imageOne.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
self.imageOne.delegate = self;
}
[self presentViewController:self.imageOne animated:YES completion:nil];
}

最佳答案

按照answer

此错误可能与iOS版本较低的设备有关。由于某些iOS版本不支持调整图像大小。并且也可能是JPG图片的问题。尝试使用PNG图片。

关于ios - CGImageCreateWithImageProvider:无效的图像尺寸:180 x 180,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17365005/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com