java - Change bitmap format using glide and BitmapTypeRequest -
don't know how :
how change decodeformat on bitmap want use request :
final bitmaptyperequest<?> request = glide.with(context) .load(uri) .asbitmap(); // here should .format(decodeformat.prefer_argb_8888) final simpletarget target = new simpletarget() { @override public void onresourceready(object resource, glideanimation glideanimation) { memcache.put(namestring, resource); } }; // must executed on main thread context.runonuithread(new runnable() { public void run() { request.into(target); } });
problem : .format(decodeformat.prefer_argb_8888)
return bitmaprequestbuilder
, need bitmaptyperequest
edit :
this operation works :
glide.with(context) .load(uri) .asbitmap() .format(decodeformat.prefer_argb_8888) .into(imageview);
but can see cache bitmaps method not use case.
check this guide. need add glidemodule customize builder, , apply trough manifest.
Comments
Post a Comment