JimmyDaddy / react-native-image-marker

🙈Adding text or icon watermark to your image using React Native👀👀
https://jimmydaddy.github.io/react-native-image-marker/
MIT License
325 stars 94 forks source link

Why is an error reported on IOS #96

Closed 4396mingkai closed 1 year ago

4396mingkai commented 1 year ago

This is an error message

TypeError: Cannot read properties of undefined (reading 'addText') at Function.markText (index.js:51:32) at _callee9$ (CustomerLook.js:1116:11) at tryCatch (regeneratorRuntime.js:44:17) at Generator. (regeneratorRuntime.js:125:22) at Generator.next (regeneratorRuntime.js:69:21) at tryCatch (regeneratorRuntime.js:44:17) at invoke (regeneratorRuntime.js:75:20) at regeneratorRuntime.js:96:13 at tryCallTwo (core.js:45:5) at doResolve (core.js:200:13)

Here is the source code

let markImage = await ImageMarker.markText({ src: image.path, // text: ${agentInfo?.ogzStoreGroupName}-${agentInfo?.name}\n${moment().format('YYYY-MM-DD hh:mm:ss')}, text:'dsfjsjf', // position: 'bottomLeft', X: ScreenUtil.scaleSize(30), // 文字位置 Y: 1500, color: '#FFFFFF', fontName: 'PingFangSC-Regular', fontSize: 32, scale: 1, quality: 100, maxSize: 2048, filename: image.filename, shadowStyle: null, textBackgroundStyle: null, saveFormat: ImageFormat.jpg, });

JimmyDaddy commented 1 year ago

pls use the latest version try again