angular - 在 Angular 8 中使用 ng2-img-max 调整图像大小时出错
问题描述
当我更新到 Angular 8 时,我的调整大小方法ng2-img-max
停止工作,现在显示此错误。
core.js:6014 ERROR ReferenceError: n is not defined
at getStringFromDB (exif.js:741)
at readEXIFData (exif.js:748)
at findEXIFinJPEG (exif.js:449)
at handleBinaryFile (exif.js:370)
at FileReader.fileReader.onload (exif.js:391)
at ZoneDelegate.invoke (zone-evergreen.js:359)
at Object.onInvoke (core.js:39699)
at ZoneDelegate.invoke (zone-evergreen.js:358)
at Zone.runGuarded (zone-evergreen.js:134)
at FileReader.<anonymous> (zone-evergreen.js:118)
代码是:
this.ng2ImgMax.resize([image], 1000, 200).subscribe
有谁知道如何解决这个问题?
解决方案
我使用 npm i ngx-image-compress 解决它并卸载 ng2-img-max 看到这个链接 https://www.npmjs.com/package/ngx-image-compress
推荐阅读
- r - 为R中的每个元素列表添加前缀
- python - 如何从另一个类返回条目值?
- python - Fabric 的 connection.forward_local 超出范围时失败
- visual-studio-code - 如何移动“查找”小部件
- javascript - 通过脚本从一个角度项目加载到另一个角度项目时面临问题
- elasticsearch - 使用 Java API 的 Elasticsearch 嵌套查询和 Rest API 查询有不同的响应
- google-analytics - 将谷歌分析数据添加到 Zoho CRM 潜在客户信息
- html - 如何在我的 HTML 文档中使用 FromArray 中的特定 FormControl?
- sqlite - 内部将一个表两次连接到另一个表 - sqlite
- php - 从浏览器直接文件夹访问访问 php 文件的内容