我已经从片段中重新修改了位图,我在imageview中放置了位图(由tearray解码),我想裁剪这个位图@Overridepublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fr_editcrop, container, false); cropphoto = (ImageView)view.findViewById(R.id.cropphoto); title = (TextView)view.findViewById(R.id.title); title.setText("Crop"); crop = (Button)view.findViewById(R.id.crop); cancel = (Button)view.findViewById(R.id.cancel); tmp = getArguments().getString("PHOTO"); byte [] encodeByte=Base64.decode(tmp,Base64.DEFAULT); bmp=BitmapFactory.decodeByteArray(encodeByte, 0, encodeByte.length); cropphoto.setImageBitmap(bmp); Width = cropphoto.getWidth(); Height = cropphoto.getHeight(); 最佳答案 调用这个reference 07-27 20:49