有人知道如何使用AVFoundation(AVCaptureStillImageOutput)在自定义iOS相机中设置自定义分辨率吗?
我知道您可以使用AVCaptureSession选择预设,但我需要920x920的输出分辨率(预设不提供)。目前我使用AVCaptureSessionPresetHigh并在之后重新调整UIImage的大小,但这似乎很愚蠢,而且需要额外的处理。
答案 0 :(得分:1)
你不能,但你可以做的是遍历所有Select a.theDate, b.cnt from ExplodeDates('2014-11-25', '2014-12-03') a
outer apply (
SELECT count(*) cnt FROM tblMain where DiscCode = '502'
and
case when CONVERT (date, a.TheDate) = '2014-12-03' then
case when DischargeDate > CONVERT (date, '03-dec-2014') then 1 else 0 end
else
case when DischargeDate BETWEEN CONVERT (date, a.TheDate) AND CONVERT (date, '2014-12-03') then 1 else 0 end
end = 1
) b
s寻找更接近你的分辨率的那个。
要获得所有可用格式的完整列表,只需使用属性AVCaptureDeviceFormat
查询捕获设备
Apple的这个示例显示了如何选择最佳帧速率:
-formats
答案 1 :(得分:0)
请查看我自己回答的一个旧问题,它可能对您有帮助。