在iPad 3的Retina与iOS 6.1,我初始化我的相机有:GPUImageStillCamera输出分辨率有限公司
stillCamera = [[GPUImageStillCamera alloc] initWithSessionPreset:AVCaptureSessionPresetPhoto cameraPosition:AVCaptureDevicePositionBack];
stillCamera.outputImageOrientation = UIInterfaceOrientationLandscapeLeft;
我设置了摄像头,这些过滤器:
UIImage *inputImage = [UIImage imageNamed:@"blank-1x1.png"];
sourcePicture = [[GPUImagePicture alloc] initWithImage:inputImage smoothlyScaleOutput:YES];
[sourcePicture processImage];
chromaKeyBlendFilter = [[GPUImageChromaKeyBlendFilter alloc] init];
[chromaKeyBlendFilter setColorToReplaceRed:0.0 green:1.0 blue:0.0];
[chromaKeyBlendFilter setThresholdSensitivity:0.37f];
filter = chromaKeyBlendFilter;
[stillCamera addTarget:filter];
[sourcePicture addTarget:filter];
[filter addTarget:videoPreviewView]; // 1024x768 view
[stillCamera startCameraCapture];
当我捕捉我使用的图像:
[stillCamera capturePhotoAsPNGProcessedUpToFilter:filter withCompletionHandler:^(NSData *processedPNG, NSError *error){
self.currentImage = [UIImage imageWithData:processedPNG];
});
但我得到的图像是屏幕大小(视网膜风格)2048x1536,而不是什么我期待后置摄像头为2420x1936。我也注意到#imageFromCurrentlyProcessedOutputWithOrientation#只返回屏幕大小,并且在GPUImageStillCamera.m中查看捕获代码,它看起来好像是输出源自的地方。
我不知道为什么,因为我也有一个选项/按钮来使用非GPUImage设置,我找回了2420x1936的PNG图像。
我在这里做错了什么?感谢您的任何提示(因为我真的想要2420x1936)。