Scale bitmap android and performance
<p>Good Day,
I have an <code>Image</code> which is loaded using <code>Picasso</code> the size is 1110x300px, I need to crop image to 550 x 300px, currently I'm trying to use <code>Bitmap.createScaledBitmap()</code>  but this method only resize my image, not crop. </p>

<p>And there is another problem  - bad performance.</p>

<p>My code:</p>

<pre><code> Runnable r = new Runnable(){
                @Override
                public void run() {
                    Picasso.with(getActivity()).load(builder.toString()).into(new Target() {
                    @Override
                    public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {
                        int width = Double.valueOf(bitmap.getWidth() * 0.5).intValue();
                        int height = bitmap.getHeight()


                        Bitmap newBitmap = Bitmap.createScaledBitmap(bitmap, width, height, true);
                        imageView.setImageBitmap(newBitmap);
                    }

                    @Override
                    public void onBitmapFailed(Drawable errorDrawable) {}
                    @Override
                    public void onPrepareLoad(Drawable placeHolderDrawable) {}

                    });
                  }
};
r.run();
</code></pre>

<p>The question: How to make my Bitmap scaled, not re-sized and how to increase performance of my code.</p>

<p>Thank you!</p>