【发布时间】:2016-11-22 09:01:16
【问题描述】:
我正在使用相机拍摄电影。
我想使用滑块来缩放视频,例如缩放谷歌地图。
我找到了另一个Question on SO,但建议的解决方案适用于点击,而我想为滑块开发一个解决方案。
我编写了无法正常工作的代码。
我没有发现错误,但是视频大小会很大,然后我看不到视频。
我尝试为相机设置 digitalZoom,但出现此错误:
相机不支持变焦。 .我知道我的相机不支持“DigitalZoom”和“OpticalZoom”。我想找到一种方法来放大从相机拍摄的视频。
My camera is dino ccd.
对不起朋友,我不能添加评论,我有这个错误:“你必须有 50 声望才能评论”。
VideoOutput {
id: viewfinder
source: camera
anchors.fill: parent
focus : true
transform: [
Scale {
id: zoomScale
},
Translate {
id: zoomTranslate
}
]
//Keys.onLeftPressed: viewfinder.seek(viewfinder.position - 5000)
//Keys.onRightPressed: viewfinder.seek(viewfinder.position + 5000)
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.AllButtons
onClicked: {
var zoomIn = mouse.button === Qt.LeftButton;
zoomScale.origin.x = mouse.x;
zoomScale.origin.y = mouse.y;
}
}
Slider {
id:zoomVideo
orientation: Qt.Vertical
minimumValue: 0
maximumValue: 100
stepSize: 10
onValueChanged: {
zoomScale.xScale = zoomVideo.value
zoomScale.yScale = zoomVideo.value
}
}
}
【问题讨论】:
-
那么你的问题是什么?
-
not working correctly是什么意思?您会遇到什么错误/意外行为? -
您使用的是什么设备?基本上所有相机都支持数码变焦,只有启用光学变焦的移动相机很少见。