Вы можете изменить функцию onSizeChanged () на
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
BitmapFactory.Options decode_options = new BitmapFactory.Options();
decode_options.inMutable = true;
mBitmap = BitmapFactory.decodeFile(<file_path>,decode_options);
mCanvas = new Canvas(mBitmap);
mBitmapPaint.setXfermode(new PorterDuffXfermode (SRC_IN));
}