获取BASE64 URL后无法获取图像位图

时间:2018-11-20 14:06:21

标签: android base64 android-bitmap

//Storing byte[]

            try {
                Bitmap bitmap=dao.BitmapOrientation(s,bitmap_new);

                SelectPhotosModal modal= new SelectPhotosModal();
                modal.setSelected(false);
                modal.setEye_image_type(place_eye);
                ByteArrayOutputStream stream = new ByteArrayOutputStream();
                bitmap.compress(Bitmap.CompressFormat.PNG, 20, stream);
                byte[] byteArray = stream.toByteArray();
//                bitmap.recycle();
                Log.d("byte","byte"+byteArray.toString());
                modal.setImage_byte(byteArray);
                list_bitmap.add(modal);
            } catch (IOException e) {
                e.printStackTrace();
            }


//Convert byte[] to base64 

        String imgString = Base64.encodeToString(list_photos.get(i).getImage_byte(), Base64.NO_WRAP | Base64.URL_SAFE);
//            list_photos_base.add(imgString);
        Log.d("arr_photos_list","arr_photos_list"+imgString);

无论打印什么日志,我都将在线base64粘贴到图像编译器,但找不到图像。请提出建议。

0 个答案:

没有答案