Bitmap bmp = BitmapFactory.depreResource(getResources(), R.drawable.chicken);//your imageByteArrayOutputStream bYtE = new ByteArrayOutputStream();bmp.compress(Bitmap.CompressFormat.PNG, 100, bYtE);bmp.recycle();byte[] byteArray = bYtE.toByteArray();String imageFile = base64.enpreToString(byteArray, base64.DEFAULT);
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)