longitachi / ZLPhotoBrowser

Wechat-like image picker. Support select photos, videos, gif and livePhoto. Support edit image and crop video. 微信样式的图片选择器,支持预览/相册内拍照及录视频、拖拽/滑动选择,编辑图片/视频,支持多语言国际化等功能;
MIT License
4.77k stars 966 forks source link

拍摄后的照片,预览图范围变得很大。 #889

Closed std-s closed 8 months ago

std-s commented 8 months ago

Issue Description

@longitachi 你好,目前发现拍摄后预览的照片,相较于拍摄时的取景范围变大。

请教如何解决这个问题呢?

Description and Steps

Please fill in the detailed description of the issue (full output of any stack trace, compiler error, ...) and the steps to reproduce the issue.

Info

ZLPhotoBrowser version: e.g. 4.4.8.2 Device: e.g. iPhone 14 Pro Device version: e.g. iOS 16.0 Xcode version: e.g. Xcode 14.0

Configuration code of ZLPhotoConfiguration

   Paste your code here.
longitachi commented 8 months ago

可以上传个视频吗?看下效果

std-s commented 8 months ago

@longitachi https://github.com/longitachi/ZLPhotoBrowser/assets/99468005/e7675b6a-9b3c-48f2-a818-8e307a900060

可以上传个视频吗?看下效果

std-s commented 8 months ago

拍照完成以后的预览界面下部很大块黑边,为什么不是全屏呢。

longitachi commented 8 months ago

提供一下信息吧,机型、系统、ZLPhotoBrowser版本,还有相机的配置发一下,就cameraConfiguration

std-s commented 8 months ago

@longitachi 看看呢。

ZLPhotoBrowser version: 4.4.8.2 Device: iPhone 12 Pro Max Device version: iOS 17.1 Xcode version: Xcode 15.0


        let config = ZLPhotoConfiguration.default()
        config.allowSelectImage = true
        config.allowSelectVideo = true
        config.allowSelectGif = true
        config.allowSelectLivePhoto = false
        config.allowSelectOriginal = false
        config.cropVideoAfterSelectThumbnail = true
        config.allowEditVideo = false
        config.allowEditImage = false
        config.allowMixSelect = true
        config.maxSelectCount = 9
        config.maxEditVideoTime = 60

        let cameraConfig = ZLCameraConfiguration()
        cameraConfig.sessionPreset = .vga640x480
        cameraConfig.videoExportType = .mp4
        config.cameraConfiguration = cameraConfig
longitachi commented 8 months ago

这就对了,你sessionPreset设置的是vga640x480,拍照界面是为了UI好看,做了缩放,拍照完之后拿到的图片是640x480的图片,所以比例会那样

std-s commented 8 months ago

感谢。