build-webos icon indicating copy to clipboard operation
build-webos copied to clipboard

API for taking screenshots

Open ilyai opened this issue 6 years ago • 3 comments

I'm wondering what methods are available for taking screenshots in png or jpeg format. I've searched there: http://webosose.org/develop/ls2-api/ls2-api-reference/ and couldn't find any related method.

In X11 environment our application is able to take screenshots using AWT, but on WebOS it's not working.

The error I'm getting is:

java.awt.AWTError: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable.

Also tried ':0.0' value for DISPLAY variable, same error.

ilyai avatar Apr 20 '18 15:04 ilyai

Also, XWayland does not seem to be available on the WebOS OSE build for r-pi

rabzu avatar Apr 25 '18 14:04 rabzu

webOS doesn't work on X11 environment. Please see http://forum.webosose.org/t/capturing-screenshots-on-webos/326/5 for capture API

chbae avatar Jun 26 '18 11:06 chbae

@chbae any update on this?

rabzu avatar Jan 21 '19 15:01 rabzu

Use one of the followings:

  • luna-send -f -n 1 luna://com.webos.surfacemanager/captureCompositorOutput '{"format":"JPG","displayId":0,"output":"/tmp/screenshots/before.jpg"}'
  • Ctrl + Shift + Alt + F9

Heeam-Shin avatar Feb 02 '24 01:02 Heeam-Shin