Closed karthikkarunanithi91 closed 8 months ago
My source code is
const options = { // background image backgroundImage: { src: require('../../assets/Image/abtr_centralOffice.png'), scale: 1, }, watermarkTexts: [{ text: 'hellow', 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);
@karthikkarunanithi91 The image didn't upload successfully. Did you mean that the watermark on the image was invisible?
I have tried with your code, but it got correct result
const options = {
// background image
backgroundImage: {
src: require('./bg.png'),
scale: 1,
},
watermarkTexts: [
{
text: 'hellow',
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,
};
const path = await Marker.markText(options);
I used "react-native-image-marker": "^1.1.11",
![Uploading WhatsApp Image 2024-01-09 at 9.22.50 AM.jpeg…]()