title: Java Android glide resize image
body: <p>I want to resize image use by glide . Now I use a picasso but I want to use a glide</p>
  
  <pre><code>private void resizeImg(Context context, final File file, int targetSize, Handler handler) {
          final BitmapFactory.Options options = new BitmapFactory.Options();
          options.inJustDecodeBounds = true;
          BitmapFactory.decodeFile(file.getPath(), options);
  
          float ratio = Math.max(options.outWidth, options.outHeight) / (float) targetSize;
  
          //don't scale image that is smaller than targetSize
          if (ratio &lt; 1) return;
  
          int dstWidth = (int) (options.outWidth / ratio);
          int dstHeight = (int) (options.outHeight / ratio);
  
          PicassoTargetFactory.getInstance().putTarget(file, handler);
  
          Picasso.with(context)
                  .load(file)
                  .error(R.drawable.ic_delete)
                  .resize(dstWidth, dstHeight)
                  .into(PicassoTargetFactory.getInstance().getTarget(file));
          ArrayList&lt;String&gt; paths = new ArrayList&lt;&gt;();
          files = new ArrayList&lt;&gt;();
          files.add(mCurrentPhotoPath);
          for (File f : files) {
              paths.add(f.getAbsolutePath());
          }
          mdb.insertPhotos(paths);
  
      }
  </code></pre>
  
  <p>How I can do this ? On piccaso sometimes I have a cut image</p>