交流专区
服务市场
开发者平台
学堂
文档
小程序
  • 常用主页

    小程序

    小游戏

    企业微信

    微信支付

  • 服务市场
    微信学堂
    文档
登录
切换主页

暂无个人介绍

关注私信

正在关注

0

关注者

0

获得过 0 次赞
回答过的问题获得 0 次赞
分享过的文章/案例获得 0 次赞
评论与回复获得 0 次赞
文章 回答 提问 收藏 关注问题
  • createOffscreenCanvas 如何使用?canvasToTempFilePath报错

    1、使用离屏 定义如下 const canvas = wx.createOffscreenCanvas({ type: '2d', width: canvasWidth, height: canvasHeight }) const canvasCtx = canvas.getContext('2d') 2、顺利生成 let res = canvasCtx.createImageData(canvasWidth,canvasHeight) (一点也不顺利的 结果 ) res 的 值{data: Uint8ClampedArray(1216500), width: 375, height: 811, dataUnion: Uint8ClampedArray(1216500)} 3、问题1 我要怎么用这个数据呢? 4、也无法存下图片,这一步报错 wx.canvasToTempFilePath({ x: 0, y: 0, width: canvasWidth, height: canvasHeight, destWidth: canvasWidth, destHeight: canvasHeight, canvas: canvas, success(res) { console.log(res.tempFilePath) } }) wx.canvasToTempFilePath 这一步的报错信息如下 VM282 WAService.js:2 TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The provided value is not of type '(CSSImageValue or HTMLImageElement or SVGImageElement or HTMLVideoElement or HTMLCanvasElement or ImageBitmap or OffscreenCanvas)'

    2021-06-09
    2收藏7评论4715浏览
关闭

选择需要上架的开放服务

  • 模板开发

    针对行业、场景的小程序代开发服务,帮助企业快速搭建小程序

    上架
  • 插件

    提供可被小程序直接使用、丰富小程序能力的功能模块

    上架
  • 小商店服务

    为小商店商家提供更多的能力,帮助商家经营好小商店

    上架
关闭

案例类型

  • 小程序
  • 插件
  • 关于腾讯
  • 运营规范
  • 文档中心
  • 辟谣中心
  • 客服中心
  • Copyright © 2012-2025 Tencent. All Rights Reserved.