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

How to return imageBytes without saving image to file or copy it to clipboard ? #32

Open
dridihaythem opened this issue Mar 29, 2024 · 1 comment

Comments

@dridihaythem
Copy link

i want to know if there is a way to obtain image bytes without saving the images to a file or copying it to the clipboard.?


 Future<String> takeScreenShot() async {
    CapturedData? capturedData = await screenCapturer.capture(
      mode: CaptureMode.window,
      imagePath: null,
      copyToClipboard: false,
    );

    String base64 = base64Encode(capturedData!.imageBytes!);

    return base64;
  }

@cn-tre-lfp
Copy link

@dridihaythem in my opinion, there may be performance issues with transferring imageBytes.

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

2 participants