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

Buffer not large enough for pixels #2

Open
duard opened this issue Sep 5, 2016 · 3 comments
Open

Buffer not large enough for pixels #2

duard opened this issue Sep 5, 2016 · 3 comments

Comments

@duard
Copy link

duard commented Sep 5, 2016

09-05 11:00:24.183 9896-9896/in.omerjerk.screenshotter D/AndroidRuntime: Shutting down VM
09-05 11:00:24.183 9896-9896/in.omerjerk.screenshotter E/AndroidRuntime: FATAL EXCEPTION: main
                                                                         Process: in.omerjerk.screenshotter, PID: 9896
                                                                         java.lang.RuntimeException: Buffer not large enough for pixels
                                                                             at android.graphics.Bitmap.copyPixelsFromBuffer(Bitmap.java:535)
                                                                             at in.omerjerk.libscreenshotter.Screenshotter.onImageAvailable(Screenshotter.java:131)
                                                                             at android.media.ImageReader$ListenerHandler.handleMessage(ImageReader.java:648)
                                                                             at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                             at android.os.Looper.loop(Looper.java:148)
                                                                             at android.app.ActivityThread.main(ActivityThread.java:5417)
                                                                             at java.lang.reflect.Method.invoke(Native Method)
                                                                             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                                                                             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

@amnazhatdinov
Copy link

Try it by replacing Bitmap.Config.ARGB_8888 to Bitmap.Config.RGB_565.

@CraftsmanHyj
Copy link

Try it by replacing Bitmap.Config.ARGB_8888 to Bitmap.Config.RGB_565.

not woking

@zyfdegh
Copy link

zyfdegh commented Oct 7, 2021

I changed to ALPHA_8 and it works.

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

4 participants