Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add multiple icons and texts with a single function #222

Open
k2-ux opened this issue Feb 24, 2024 · 3 comments
Open

add multiple icons and texts with a single function #222

k2-ux opened this issue Feb 24, 2024 · 3 comments

Comments

@k2-ux
Copy link

k2-ux commented Feb 24, 2024

Describe the bug
I want to set the icons and texts with a single function to achieve something like the image attached

Devlopment environment(please complete the following information):

react-native: 0.72.5
react-native-image-marker : 1.1.x
Smartphone (please complete the following information):

Device: emulator & device
OS: android (for now)
Additional context
it is something close to a watermark
sample_image

@JimmyDaddy
Copy link
Owner

Hello, currently no API can set both image and text watermarks at the same time. You can try setting them in separate steps.

let res = await Marker.markText(textOptions);
res = await Marker.markImage({ backgroundImage: { src: res }, ...imageOptions });

@MoinVnr
Copy link

MoinVnr commented Apr 23, 2024

How can i add watermarkImages and watermarkTexts in single function so now I'm able to achieve with different function for markImage and markText.
@JimmyDaddy

const overlayedImage = await ImageMarker.markImage({
backgroundImage: {
src: data.uri,
scale: 1,
},
quality: 100,
filename: 'ImageMarker',
saveFormat: 'png',
watermarkImages: [
{
src: markerLogo,
scale: 8,
position: {
position: Position.topRight,
},
},
],
});
// Overlay Marker Text
const overlayedText = await ImageMarker.markText({
backgroundImage: {
src: data.uri,
scale: 1,
},
quality: 100,
filename: 'TextMarker',
saveFormat: 'png',
watermarkTexts: [{
text: ${dateTime}\n${locationAddress},
position: {
position: Position.bottomCenter,
},
style: {
color: '#217157',
fontSize: 180,
fontName: 'Arial',
},
}],
});
Aslso try below code but not working so please help with this issue.

let res = await Marker.markText(textOptions);
res = await Marker.markImage({ backgroundImage: { src: res }, ...imageOptions });

@MoinVnr
Copy link

MoinVnr commented May 24, 2024

Hey @JimmyDaddy and @k2-ux
I want to set both image and text watermarks at the same time in single fuction so
please help me with this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants