Glide Bitmap 로드에 대한 질문

696 단어
비트맵 대상을 바이트로 변환해서 불러오기;
 ByteArrayOutputStream baos = new ByteArrayOutputStream();
            bitmap.compress(Bitmap.CompressFormat.PNG, 100, baos);
            byte[] bytes=baos.toByteArray();

            Glide.with(mContext)
                    .load(bytes)
                    .centerCrop()
//                    .thumbnail(0.1f)   //           
                    .override(Utils.px2dip(mContext,130),Utils.px2dip(mContext,130)) //    
                    .placeholder(me.iwf.photopicker.R.drawable.__picker_ic_photo_black_48dp)
                    .error(me.iwf.photopicker.R.drawable.__picker_ic_broken_image_black_48dp)
                    .into(holder.ivPhoto);

좋은 웹페이지 즐겨찾기