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

Overlay image getting blurred when trying to watermark it on a background image #231

Open kaykecastrosi opened 2 months ago

kaykecastrosi commented 2 months ago

Describe the bug I'm trying to watermark a QRCode with the resolution of 500x500 on top of a background image, but when the image returns, the QRCode gets blurred.

To Reproduce Steps to reproduce the behavior:

const plottedIMG = await Marker.markImage({
  backgroundImage: {
    src: backgroundImgURI,
    scale: 1,
  },
  watermarkImages: [
    {
      src: `data:image/png;base64,${QRCode.base64}`,
      //Using scale 0.2 to get the final resolution of 100x100
      scale: 0.2,
      position: {
        X: imgWidth - IOS_CONFIG.marginX,
        Y: imgHeight - 100 - IOS_CONFIG.marginY,
      },
    },
  ],
  quality: 100,
  saveFormat: ImageFormat.jpg,
});

Expected behavior Expected to have an image with a high quality

Devlopment environment(please complete the following information):

Smartphone (please complete the following information):