Android: How can i convert a Bitmap array to Int array? -
i'm cutting images of int array...
int[] imagenes_originales = new int[] { r.drawable.image1, r.drawable.image2, r.drawable.image3, r.drawable.image4 } int[] new_images; (a = 0; <= 3; a++) { bitmap bitmap = bitmapfactory.decoderesource(getresources(), imagenes_originales[a]); int x = bitmap.getwidth(), y = bitmap.getheight(); int escalax = getwindowmanager().getdefaultdisplay().getwidth(); bitmap recorte = bitmap.createbitmap(bitmap, 0, y / 2, escalax, 100); }
how can convert bitmap images in new_images[]
variable?
bitmap bitmap = bitmapfactory.decoderesource(getresources(), imagenes_originales[a]); int x = bitmap.getwidth(); int y = bitmap.getheight(); int[] intarray = new int[x * y]; bitmap.getpixels(intarray, 0, x, 0, 0, x, y);
your bitmap int array in intarray
/
Comments
Post a Comment