Is there a way to load image as bitmap to Glide

后端 未结 11 1457
温柔的废话
温柔的废话 2020-12-04 19:35

Im looking for a way to use bitmap as input to Glide. I am even not sure if its possible. It\'s for resizing purposes. Glide has a good image enhancement with scale. The pro

11条回答
  •  我在风中等你
    2020-12-04 20:08

    Please use Implementation for that is:

    implementation 'com.github.bumptech.glide:glide:4.9.0'

         Glide.with(this)
         .asBitmap()
          .load("http://url")
        .into(new CustomTarget () {   
    @Override  
    public void onResourceReady(@NonNull Bitmap resource, @Nullable Transition  transition) { 
                    // you can do something with loaded bitmap here
    
     }
    @Override 
    public void onLoadCleared(@Nullable Drawable placeholder) { 
     } 
    });
    

提交回复
热议问题