调用腾讯端口,为什么图片总是被压缩为640px的尺寸图片,怎么回事?
我的部分代码,但是并不起作用,而且640px也不是我代码里的数值????
wx.getImageInfo({
src: filePath,
success: (res) => {
if (res.width > 1080 && res.height > 1080) {
if (res.width > res.height) {
wx.compressImage({
src: filePath,
quality: 80,
compressedHeight: 1080,
success: (res2) => {
imgFilePath = res2.tempFilePath
wx.getFileInfo({
filePath: res2.tempFilePath,
success: (res3) => {
imgFileSize = res3.size
resolve({ imgFilePath, imgFileSize })
},
})
},
})
我的代码里有约束,但一直被压缩