关于安卓Bitmap,怎样写一个缩放图片的方法?

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.editnote);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar_edit);
setSupportActionBar(toolbar);
EditText editText = (EditText)findViewById(R.id.edit_content);
String imagePath = getIntent().getBundleExtra("neirong").getString(
"nei");
SpannableString ss = new SpannableString(imagePath);
Pattern p=Pattern.compile("/mnt/sdcard/.+?\.\w{3}");
Matcher m=p.matcher(imagePath);
while(m.find()){
Bitmap bm = BitmapFactory.decodeFile(m.group());
Bitmap rbm = resizeImage(bm, 100, 100);
ImageSpan span = new ImageSpan(this, rbm);
ss.setSpan(span, m.start(), m.end(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
}
editText.setText(ss);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);

    InitView();
}
    对应如上代码,resizeImage方法该怎么写?

http://www.oschina.net/code/snippet_16_2540

http://blog.csdn.net/stoppig/article/details/23198809

BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
String fullFilePathString = f.getAbsolutePath();
WindowManager windowManager = this.getWindowManager();
Display winDisplay = windowManager.getDefaultDisplay();
int width = winDisplay.getWidth();
int scale = 1;
if (options.outWidth>width) {
scale = options.outWidth/width;

            }
            options.inJustDecodeBounds = false;
            options.inSampleSize = 3;
            Bitmap myBitmap = BitmapFactory.decodeFile(fullFilePathString,options);
            //myBitmap = BitmapFactory.decodeFile(f.getAbsolutePath());
            imageView.setImageBitmap(myBitmap);