We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
如果在小程序使用下面的代码是无法加载本地图片的:
const bitmap = new cax.Bitmap('./local.png', () => {
看了下util里面的代码,用判断是否是wxfile://开头来判断是否是网络图片,在小程序里面就走downloadfile了。
export function getImageInWx (img, callback) { if (img.indexOf('wxfile://') === 0) { wx.getImageInfo({ src: img, success: (info) => { callback({ img: img, width: info.width, height: info.height }) } })
The text was updated successfully, but these errors were encountered:
57173ff
多谢~ @hujian
Sorry, something went wrong.
No branches or pull requests
如果在小程序使用下面的代码是无法加载本地图片的:
看了下util里面的代码,用判断是否是wxfile://开头来判断是否是网络图片,在小程序里面就走downloadfile了。
The text was updated successfully, but these errors were encountered: