screen_capturer icon indicating copy to clipboard operation
screen_capturer copied to clipboard

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

Open dridihaythem opened this issue 1 year ago • 1 comments

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;
  }

dridihaythem avatar Mar 29 '24 16:03 dridihaythem

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

cn-tre-lfp avatar Apr 16 '24 07:04 cn-tre-lfp