2016-08-27 2 views
0

現在、私は正方形の写真をキャプチャするためにGPUImageを使用しています。出力サイズ以外はすべて正常に動作しています。出力は、x 2448 2448ですが、私はこれは私の現在の設定である1080 X 1080iOS:GPUImage ForceProcessingAtSizeが動作するのに問題がありますか?

することを強制したい:私はいくつかのサイトで推奨-(void)forceProcessingAtSize:方法を使用しています

//Setup Photo Camera 
self.photoCamera = [[GPUImageStillCamera alloc] initWithSessionPreset:AVCaptureSessionPresetPhoto cameraPosition:AVCaptureDevicePositionBack]; 
self.photoCamera.outputImageOrientation = UIInterfaceOrientationPortrait; 
self.photoCamera.horizontallyMirrorFrontFacingCamera = YES; 

//Setup Crop Filter 
self.cropFilter = [[GPUImageCropFilter alloc] initWithCropRegion:CroppedCenterRectPhoto]; 
[self.cropFilter forceProcessingAtSize:CGSizeMake(1080, 1080)]; 

//Setup CameraView 
self.cameraView = [[GPUImageView alloc] init]; 

//Add Targets 
[self.photoCamera addTarget:self.cropFilter]; 
[self.cropFilter addTarget:self.cameraView]; 
self.cameraView.fillMode = kGPUImageFillModePreserveAspectRatioAndFill; 

が、それは何もしていない。私はそれを間違って使用していますか?

答えて

0

self.photoCamera = [[GPUImageStillCamera alloc] initWithSessionPreset:AVCaptureSessionPreset1920x1080 cameraPosition:AVCaptureDevicePositionBack]; 

self.photoCamera = [[GPUImageStillCamera alloc] initWithSessionPreset:AVCaptureSessionPresetPhoto cameraPosition:AVCaptureDevicePositionBack]; 

を交換しよう

関連する問題