title: Show Blur Image Using Glide library
body: <p>i'm trying to show blur image using <strong>Glide</strong> but instead showing error images.i have no idea why it is show error image.<strong>URL</strong> is working fine but still it is showing error image only</p>
  
  <p><strong>here is my code</strong></p>
  
  <pre><code> Glide.with(context)
                  .load("http://www.gadgetsaint.com/wp-content/uploads/2016/11/cropped-web_hi_res_512.png")
                  .diskCacheStrategy(DiskCacheStrategy.NONE)
                  .bitmapTransform(new BlurTransformation(context))
                  .error(R.drawable.error_image)
                  .into(imageView);
  </code></pre>
  
  <p><strong>BlurTransformation Class:</strong></p>
  
  <pre><code>public class BlurTransformation extends BitmapTransformation {
  
  private RenderScript rs;
  
  public BlurTransformation(Context context) {
      super(context);
  
      rs = RenderScript.create(context);
  }
  
  @SuppressLint("NewApi")
  @Override
  protected Bitmap transform(BitmapPool pool, Bitmap toTransform, int outWidth, int outHeight) {
      Bitmap blurredBitmap = toTransform.copy(Bitmap.Config.ARGB_8888, true);
  
      // Allocate memory for Renderscript to work with
      Allocation input = Allocation.createFromBitmap(
              rs,
              blurredBitmap,
              Allocation.MipmapControl.MIPMAP_FULL,
              Allocation.USAGE_SHARED
      );
      Allocation output = Allocation.createTyped(rs, input.getType());
  
      // Load up an instance of the specific script that we want to use.
      ScriptIntrinsicBlur script = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs));
      script.setInput(input);
  
      // Set the blur radius
      script.setRadius(100);
  
      // Start the ScriptIntrinisicBlur
      script.forEach(output);
  
      // Copy the output to the blurred bitmap
      output.copyTo(blurredBitmap);
  
      toTransform.recycle();
  
      return blurredBitmap;
  }
  
  @Override
  public String getId() {
      return "blur";
  }
  }
  </code></pre>