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 android 6.0.1 #116

Closed Zetakai closed 1 year ago

Zetakai commented 1 year ago

Describe the bug crash on marking an image with text then save the image to jpg

To Reproduce

ImageMarker.markText({
      backgroundImage: {
        src: src,
        scale: 1,
        rotate: 0,
        alpha: 1,
      },
      watermarkTexts: [{
        text: `${this.address}${'\n'}Latitude: ${coordinate.latitude} Longitude: ${coordinate.longitude}${'\n'}${new Date(time.dateTime).toLocaleString()}${'\n'}`,
        positionOptions: {
          position: Position.bottomCenter
        },
        style: {
          color: '#FFFFFF',
          fontSize: 10,
          fontName: 'Arial',
          textBackgroundStyle: {
            paddingX: 10,
            paddingY: 10,
            type: TextBackgroundType.stretchX,
            color: 'transparent',
          },
        },
      }],
      quality: 100,
      filename: 'test',
      saveFormat: ImageFormat.jpg,
      maxSize: 1000
    })

Expected behavior no problem on other device but get crash on this particular device

Screenshots

Screenshot 2023-09-05 at 15 06 22

Development environment(please complete the following information):

Smartphone (please complete the following information):

anyone help please 🥺

JimmyDaddy commented 1 year ago

@Zetakai What SDK level are you using? You need API level 24 or above to use it.https://developer.android.com/reference/java/util/concurrent/CompletableFuture