title: Glide v4 add rounded gradient foreground to image
body: <p>Is it possible to add rounded gradient foreground on bitmap using Glide v4?</p>
  
  <p>I tried to do it, but I overdraw corners from RoundedCorners() transformation</p>
  
  <pre><code>val requestOptions = RequestOptions().transforms(CenterCrop(), RoundedCorners(14.dp()))
  Glide.with(context)
  .asBitmap()
  .load(item.image)
  .apply(requestOptions)
  .listener(object : RequestListener&lt;Bitmap&gt; {
      override fun onLoadFailed(@Nullable e: GlideException?, model: Any, target: Target&lt;Bitmap&gt;, isFirstResource: Boolean): Boolean {
          return false
      }
  
      override fun onResourceReady(resource: Bitmap, model: Any, target: Target&lt;Bitmap&gt;, dataSource: DataSource, isFirstResource: Boolean): Boolean {
          val canvas = Canvas(resource)
          val p = Paint()
          p.shader = LinearGradient(0f, 0f, 0f, resource.height.toFloat(), Color.parseColor("#4c000000"), Color.parseColor("#cc000000"), Shader.TileMode.MIRROR);
          canvas.drawPaint(p)
          return false
      }
  })
  .into(imageView)
  </code></pre>
  
  <p>Is there any Transformation for gradient or smith like this?</p>
  
  <p>I know that I can set xml foreground to ImageView, but I am trying to avoid this.</p>