title: Is there a way to load image as bitmap to Glide
body: <p>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 problem is that I have resources as bitmap already loaded to memory. The only solution I could find is to store images to temporary file and reload them back to Glide as inputStream/file..  Is there a better way to achieve that ?</p>
  
  <p>Please before answering .. Im not talking about output from Glide.. <code>.asBitmap().get()</code> I know that.I need help with input.</p>
  
  <p>Here is my workaround solution:</p>
  
  <pre><code> Bitmap bitmapNew=null;
          try {
              //
              ContextWrapper cw = new ContextWrapper(ctx);
              File directory = cw.getDir("imageDir", Context.MODE_PRIVATE);
              File file=new File(directory,"temp.jpg");
              FileOutputStream fos = new FileOutputStream(file);
              bitmap.compress(Bitmap.CompressFormat.PNG, 90, fos);
              fos.close();
              //
              bitmapNew = Glide
                      .with(ctx)
                      .load(file)
                      .asBitmap()
                      .diskCacheStrategy(DiskCacheStrategy.NONE)
                      .skipMemoryCache(true)
                      .into( mActualWidth, mActualHeight - heightText)
                      .get();
  
              file.delete();
          } catch (Exception e) {
              Logcat.e( "File not found: " + e.getMessage());
          }
  </code></pre>
  
  <p>I'd like to avoid writing images to internal and load them again.That is the reason why Im asking if there is way to to have input as bitmap</p>
  
  <p>Thanks</p>