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

crash on android 6.0.1 #116

Closed
Zetakai opened this issue Sep 5, 2023 · 1 comment · Fixed by #117
Closed

crash on android 6.0.1 #116

Zetakai opened this issue Sep 5, 2023 · 1 comment · Fixed by #117

Comments

@Zetakai
Copy link

Zetakai commented Sep 5, 2023

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):

  • OS: macOS ventura
  • expo: 49.0.8
  • react-native: 0.72.4
  • react-native-image-marker : 1.1.0

Smartphone (please complete the following information):

  • Device: OPPO CPH1701
  • OS: android 6.0.1

anyone help please 🥺

@JimmyDaddy
Copy link
Owner

@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

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

Successfully merging a pull request may close this issue.

2 participants