private void init(Context context) {
    Log.i("YJY", "init");
    //        Bundle bundle =new Bundle();
    //        filepath = bundle.getString(PATH);
    //        Log.i("YJY",filepath);
    final LayoutInflater inflater = LayoutInflater.from(context);
    final View v = inflater.inflate(R.layout.crop_image_view, this, true);

    mImageView = (ImageView) v.findViewById(R.id.ImageView_image);

    setImageResource(filepath);
    mCropOverlayView = (CropOverlayView) v.findViewById(R.id.CropOverlayView);
    mCropOverlayView.setInitialAttributeValues(
        mGuidelines, mFixAspectRatio, mAspectRatioX, mAspectRatioY);
  }