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
316 stars 93 forks source link

Crash on ios when running markText #184

Closed dheeraj-jft closed 8 months ago

dheeraj-jft commented 8 months ago

Describe the bug Crash on ios when running markText

Screenshot 2023-12-27 at 9 13 01 PM

I am using sample code from readme.

import Marker, { ImageFormat, Position, TextBackgroundType, } from 'react-native-image-marker'; export const AddTextToImage = (path, text) => { const options = { // background image backgroundImage: { src: require('../../../assets/images/Avatar.jpg'), scale: 1, }, watermarkTexts: [ { text: text, positionOptions: { position: Position.topLeft, }, style: { color: '#ff00ff', fontSize: 30, fontName: 'Arial', shadowStyle: { dx: 10, dy: 10, radius: 10, color: '#008F6D', }, textBackgroundStyle: { padding: '10% 10%', type: TextBackgroundType.none, color: '#0FFF00', }, }, }, ], scale: 1, quality: 100, filename: 'test', saveFormat: ImageFormat.png, }; Marker.markText(options); };

dheeraj-jft commented 8 months ago

I removed the code related to color, but now I got another error.

Screenshot 2023-12-28 at 7 19 35 AM

Please let me know what I am missing here. @JimmyDaddy

JimmyDaddy commented 8 months ago

@dheeraj-jft does ../../../assets/images/Avatar.jpg exists in your project?

JimmyDaddy commented 8 months ago

@dheeraj-jft 1.2.1 is available

dheeraj-jft commented 8 months ago

Thanks, it worked.