当前位置: 首页 > news >正文

当地政府网站建设问卷调查自己做一个网站需要什么

当地政府网站建设问卷调查,自己做一个网站需要什么,网站建设主流技术,南京做网站公司本地图片宽高获取网络图片宽高获取 原理 通过在其ImageProvider上调用resolve来读取ImageStream 1.本地图片宽高获取 以IM发送本地图片为例 sendImage: (String path) async {IMImageMsgModel m IMImageMsgModel(localUrl: path);Image image Image.file(File.fromUri(Uri…
  • 本地图片宽高获取
  • 网络图片宽高获取

原理

通过在其ImageProvider上调用resolve来读取ImageStream

1.本地图片宽高获取

以IM发送本地图片为例

 

sendImage: (String path) async {IMImageMsgModel m = IMImageMsgModel(localUrl: path);Image image = Image.file(File.fromUri(Uri.parse(path)));// 预先获取图片信息image.image.resolve(new ImageConfiguration()).addListener(new ImageStreamListener((ImageInfo info, bool _) {m.width = info.image.width;m.height = info.image.height;this.sendMsg(m);}));
},

2.网络图片宽高获取

自己返回的Message格式:

 

{timestamp: 1579076501, msgType: Image, message: {imageFormat: 255, imageList: [], level: 1, path: https://ae80-1400284328-1256635546.cos.ap-shanghai.myqcloud.com/e1696b47832dd6e336a6db38b51cd3fd/23a2ad6539b63787dee8909f9bdb60b9.jpg, taskId: 0, type: Image}, msgId: 862520433, seq: 13163, rand: 862520433, isSelf: true, uniqueId: 6782081930539631729, isRead: true, status: 2, timMessageLocator: {rand: 862520433, seq: 13163, timestamp: 1579076501, sid: null, isSelf: true}, sender: e1696b47832dd6e336a6db38b51cd3fd, peer: 5d2806e96205f82dcf692370de0c7e07, customData: null, customInt: 0, customStr: , type: Image}

对方返回的Message格式:

 

{timestamp: 1579077317, msgType: Image, message: {imageFormat: 1, imageList: [{height: 2160, size: 1185181, type: Original, url: https://ae80-1400284328-1256635546.cos.ap-shanghai.myqcloud.com/5d2806e96205f82dcf692370de0c7e07/0f7b0c259f53770c6eab0cbba550e605.jpg, uuid: 1400284328_5d2806e96205f82dcf692370de0c7e07_0f7b0c259f53770c6eab0cbba550e605.jpg, width: 1080}, {height: 396, size: 0, type: Thumb, url: https://ae80-1400284328-1256635546.picsh.myqcloud.com/5d2806e96205f82dcf692370de0c7e07/0f7b0c259f53770c6eab0cbba550e605.jpg?imageView2/3/w/198/h/198, uuid: 1400284328_5d2806e96205f82dcf692370de0c7e07_0f7b0c259f53770c6eab0cbba550e605.jpg, width: 198}, {height: 1440, size: 0, type: Large, url: https://ae80-1400284328-1256635546.picsh.myqcloud.com/5d2806e96205f82dcf692370de0c7e07/0f7b0c259f53770c6eab0cbba550e605.jpg?imageView2/3/w/720/h/720, uuid: 1400284328_5d2806e96205f82dcf692370de0c7e07_0f7b0c259f53770c6eab0cbba550e605.jpg, width: 720}], level: 1, path: , taskId: 0, type: Image}

当IM回调图片不带宽高时,通过以下方法获取网络图片宽高

 

IMImageMsgModel model;
Image image = Image.network(this.detail.message['path'] ?? '');
image.image.resolve(new ImageConfiguration()).addListener(new ImageStreamListener((ImageInfo info, bool _) {model = IMImageMsgModel(url: this.detail.message['path'],width: info.image.width,height: info.image.height,);print('model.width======${model.width}');},
));

 

http://www.lbrq.cn/news/2688877.html

相关文章:

  • 二级域名网站建设百度竞价代运营托管
  • 免费帮助建站营销网络是啥意思
  • 佛山网站设计建设网络营销策略概念
  • 网站快速收录软件云搜索网页版入口
  • 做网站帮外国人淘宝crm系统网站
  • 网站推广公司兴田德润在哪里上海最新疫情
  • 做网站服务器和域名2022黄页全国各行业
  • 90做网站整合营销传播名词解释
  • 交互设计师郑州网站建设推广优化
  • 手机网站这么做链接网站关键词如何优化
  • 制作音乐appseo咨询顾问
  • 做网站市场价seo优化主要做什么
  • 淘客类网站如何做排名指数是什么
  • 企业网站对企业有什么好处沙坪坝区优化关键词软件
  • 自己做网站制作教程最近一周新闻热点回顾
  • 网站做记录访客故事式软文范例500字
  • 专业设计网站推荐螺蛳粉营销策划方案
  • 东莞厚街有什么好玩的地方seo实战培训费用
  • 广东品牌女装都有哪些品牌seo关键技术有哪些
  • jsp网站开发实例标题栏江西seo推广方案
  • 中建铁路建设有限公司网站短视频营销常用平台有
  • 网站测试软件广告软文范例
  • 正品海外购网站有哪些怎样和政府交换友链
  • 做网站首页的尺寸专业整站优化
  • 云职上海企业服务有限公司做网络优化的公司排名
  • 做网站图片分辨率优化是什么意思?
  • 一站式网站建设与运营风云榜小说排行榜
  • 电子产品网站建设 实训报告南京seo排名优化
  • 开封网站优化公司危机公关处理方案
  • 瑞丽住建局网站推文关键词生成器
  • python的游戏评级论坛系统
  • [AI React Web] 包与依赖管理 | `axios`库 | `framer-motion`库
  • 把 Linux 装进“小盒子”——边缘计算场景下的 Linux 裁剪、启动与远程运维全景指南
  • 用 Spring 思维快速上手 DDD——以 Kratos 为例的分层解读
  • JVM宝典
  • 基于 Spring Boot 的登录功能实现详解