How to load image through byte array using Glide?

前端 未结 5 1440
抹茶落季
抹茶落季 2020-12-08 13:46

I have an image contents byte[] form. But when i load them through Glide then broken images are shown. what I\'m doing is shown below.

Glide.with(context)
           


        
5条回答
  •  余生分开走
    2020-12-08 14:28

    If you are getting error on .asBitmap() just use it like this

                 Glide.with(this)
                    .asBitmap()
                    .load(imageAsBytes)
                    .into(image)
    

提交回复
热议问题