[jitsi-dev] [libjitsi] ScreenCapture.grabScreen returns byte array with all -1 (#70)


#1

When i use the grabScreen method it fills my byte array with -1

What am i doing wrong?

            Rectangle rect = new Rectangle(Toolkit.getDefaultToolkit().getScreenSize());

int width = rect.width;

            int height = rect.height;

            int size = width * height * 4;

            while (true)
            {
              byte[] bytes = new byte[size];

              boolean success = ScreenCapture.grabScreen(displayIndex, 0, 0, width, height, bytes);
              // do something with the byte array
            }

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/issues/70


#2

Now i got it to work but i need to send it to android by a socket and read it as bitmap any ideas?

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/issues/70#issuecomment-165957496


#3

Closed #70.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/issues/70#event-569988787


#4

As this isn't about a problem in libjitsi, please seek help in a Java forum.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/libjitsi/issues/70#issuecomment-189921468