在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)。