MediaProjectionDemo icon indicating copy to clipboard operation
MediaProjectionDemo copied to clipboard

Black Bitmap after screenshot

Open Raphdeumax opened this issue 7 years ago • 4 comments

Hi, When i take screenshot of YouTube during movie playing, i get a black bitmap in Imagelistener. Thanks.

Raphdeumax avatar Aug 27 '17 08:08 Raphdeumax

Hi, Which Android OS version are you using and how do you watch the movie (YoutTube app, browser, which browser version, etc). Thanks, Manos

mtsahakis avatar Aug 27 '17 08:08 mtsahakis

Hi manos and thank you for your answer. Actually i use android tv in version 6.1 and I try to capture the screen of my Android TV in bitmap format but when a video appears in the Youtube application for example, the pixels in the bitmap are black.

Raphdeumax avatar Aug 27 '17 10:08 Raphdeumax

I use a part of your code to made a system similar to Ambilight on android tv with an arduino.

Raphdeumax avatar Aug 27 '17 11:08 Raphdeumax

HI, I am not familiar with Android tv, but I would imagine that the way ImageReader is created does not fit your context. If ImageReader is in fact producing images in a reasonable frame rate, but they are black, maybe try to play around with ImageReader.newInstance(mWidth, mHeight, PixelFormat.RGBA_8888, 2); and use different formats.

mtsahakis avatar Aug 27 '17 14:08 mtsahakis