bytebuffer tag

1 questions


1 answers
108 views
0
Convert bitmap to byte array in Java

Bitmap bmp = intent.getExtras().get(data); int size = bmp.getRowBytes() * bmp.getHeight(); ByteBuffer b = ByteBuffer.allocate(size); bmp.copyPixelsToBuffer(b); byte[] bytes = new byte[size]; try { b...


© 2024 OneMinuteCode. All rights reserved.