HarmonyOS camera.PhotoCaptureSetting中 rotation: camera.ImageRotation.ROTATION_0的含义,拍照为什么还会跟随设备旋转

已设置了camera.PhotoCaptureSetting中 rotation: camera.ImageRotation.ROTATION_0

camera.PhotoOutput.capture 旋转手机拍照产出的照片,还是会带旋转角度。

想咨询下rotation: camera.ImageRotation.ROTATION_0的设置是什么含义,上述场景照片为什么还会跟随设备旋转

1.通过方法进行相机拍照

let photoCaptureSetting: camera.PhotoCaptureSetting =
  { quality: camera.QualityLevel.QUALITY_LEVEL_HIGH, // 设置图片质量高
    rotation: camera.ImageRotation.ROTATION_0 // 设置图片旋转角度0 } 
    // 使用当前拍照设置进行拍照 
    this.photoOutput?.capture(photoCaptureSetting, (err: BusinessError) => {})

2.通过

photoOutput.on('photoAvailable', (err: BusinessError, photo: camera.Photo):void=>{})

方法监听拍照回调

3.从2中得到ArrayBuffer得到image实例

已设置了

camera.PhotoCaptureSetting中 rotation: camera.ImageRotation.ROTATION_0

camera.PhotoOutput.capture 旋转手机拍照产出的照片,还是会带旋转角度。

想咨询下rotation: camera.ImageRotation.ROTATION_0的设置是什么含义,上述场景照片为什么还会跟随旋转角度

HarmonyOS
2024-12-27 16:02:43
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
shlp

camera.ImageRotation设置的是预览图片时,图片的旋转角度。而camera.PhotoOutput.capture 旋转手机拍照产出的照片,携带的照片角度是拍摄时的角度。是两个不同的概念。

分享
微博
QQ
微信
回复
2024-12-27 19:17:05
相关问题
import camera from '@ohos.multimedia.camera'
907浏览 • 1回复 待解决
camera 获取预览数据
2337浏览 • 1回复 待解决
ndk没有native camera对应头文件
2319浏览 • 1回复 待解决
HarmonyOS Camera Kit相机问题
476浏览 • 1回复 待解决
HarmonyOS 如何设置camera帧率
344浏览 • 1回复 待解决
OpenHarmony 3.0 LTS camera驱动
4347浏览 • 0回复 待解决
HarmonyOS camera设置对焦无效果
761浏览 • 1回复 待解决
OpenHarmony camera sensor调试疑问
2235浏览 • 0回复 待解决
HarmonyOS Camera 和 Scan 相关接口问题
371浏览 • 1回复 待解决
关于鸿蒙camera外设驱动编写疑问
4855浏览 • 1回复 待解决