2014-05-20 140 views

回答

0

您可以更改使用QImageEncoderSettings類圖像編碼器設置。它有一個名爲setResolution的函數來設置編碼圖像的分辨率。

QCamera * camera = new QCamera; 

QCameraViewfinder * viewfinder = new QCameraViewfinder(); 
viewfinder->show(); 

camera->setViewfinder(viewfinder); 

QCameraImageCapture * imageCapture = new QCameraImageCapture(camera); 

QImageEncoderSettings imageSettings; 
imageSettings.setCodec("image/jpeg"); 
imageSettings.setResolution(1600, 1200); 

imageCapture->setEncodingSettings(imageSettings); 
+0

對於渲染我使用QAbstractVideoSurface那麼這面連接到代理widget.So預覽如何使用QAbstractVideoSurface.I試圖setNativeResolution(分辨率)API它不是working.Thanks來設置相機預覽分辨率 – user2702569

相關問題