Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问对于HEIC格式的图片怎么处理?可以转换为jpg格式么? #83

Open
akxj2022 opened this issue Aug 28, 2019 · 1 comment
Labels

Comments

@akxj2022
Copy link

苹果ios11后的版本出了个HEIC和一个视频格式,只能在苹果设备查看,而要兼容window和安卓,还要去相机里设置兼容性,有些麻烦。

cordova里的camera选择图片的地方可以设置图片格式
navigator.camera.getPicture(
this.cameraTakePictureOnSuccess,//选取图片成功
this.cameraTakePictureOnFail,//选取图片失败
{
quality: 80,//图片质量
destinationType: navigator.camera.DestinationType.FILE_URI,
encodingType: navigator.camera.EncodingType.JPEG,
sourceType: sourceType,
saveToPhotoAlbum: true
}
);
并且即使原图是HEIC格式,获得的仍是jpg格式的图片
那么mediaPicker里是否也可以设置一个参数传递这个图片类型,使得获得到的都是jpg?感谢

@DmcSDK
Copy link
Owner

DmcSDK commented Aug 29, 2019

@akxj2022 我明白你的需求,不好意思目前的话要达到变成JPG格式,只能getmedia后再调一下我插件提供的压缩图片API,这时候返回的就是JPG格式(compressImage 方法)。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants