私はカメラからできるだけ良い画像を取得しようとしていますが、その例を見つけることしかできず、captureStillImageAsynchronouslyFromConnection
すぐに次の場所に移動します。
NSData *imageData = [AVCaptureStillImageOutput jpegStillImageNSDataRepresentation:imageSampleBuffer];
UIImage *image = [[UIImage alloc] initWithData:imageData];
JPEGは不可逆であり、データをPNGとして、またはRGBA(BGRA、what-have-you?)として取得する方法はありますか?AVCaptureStillImageOutputには他のNSData*メソッドがないようです...。
実際にCMSampleBufferRefを見ると、すでにJPEGとしてロックされているようです〜
formatDescription = <CMVideoFormatDescription 0xfe5e1f0 [0x3e5ac650]> {
mediaType:'vide'
mediaSubType:'jpeg'
mediaSpecific: {
codecType: 'jpeg' dimensions: 2592 x 1936
}
extensions: {(null)}
}
フル解像度の写真を撮り、生データを取得する他の方法はありますか?