마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

비트맵 크롭 가이드 부탁드립니다.

0 추천
	private void performCrop(Uri picUri) {
	    try {

	        Intent cropIntent = new Intent("com.android.camera.action.CROP");
	        // indicate image type and Uri
	        cropIntent.setDataAndType(picUri, "image/*");
	        // set crop properties
	        cropIntent.putExtra("crop", "true");
	        // indicate aspect of desired crop
	        cropIntent.putExtra("aspectX", 1);
	        cropIntent.putExtra("aspectY", 1);
	        // indicate output X and Y
	        cropIntent.putExtra("outputX", 256);
	        cropIntent.putExtra("outputY", 256);
	        // retrieve data on return
	        cropIntent.putExtra("return-data", true);
	        // start the activity - we handle returning in onActivityResult
	        startActivityForResult(cropIntent, PIC_CROP);
	    }
	    // respond to users whose devices do not support the crop action
	    catch (ActivityNotFoundException anfe) {
	        // display an error message
	        String errorMessage = "Whoops - your device doesn't support the crop action!";
	        Toast toast = Toast.makeText(this, errorMessage, Toast.LENGTH_SHORT);
	        toast.show();
	    }
	}
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
	    super.onActivityResult(requestCode, resultCode, data);

	    if (requestCode == PIC_CROP) {
	    	if(resultCode == RESULT_OK){
	    		Log.e("data : " , data.toString());
		        if (data != null) {
		            // get the returned data
		            Bundle extras = data.getExtras();
		            // get the cropped bitmap
		            Bitmap selectedBitmap = extras.getParcelable("data");
	
		            selectedBitmap = selectedBitmap.createScaledBitmap(bitmap, 450, 200, true);
			        resultImage.clearFocus();
		            resultImage.setImageBitmap(selectedBitmap);
		        }
	    	}else if(resultCode == RESULT_CANCELED){
	    		// 취소 시
	    	}else{
	    		return ;
	    	}
	    }

	}

비트맵 크롭으로 바꾸고 싶습니다. 가이드 부탁드려요 ㅠㅠ

익명사용자 님이 2015년 5월 15일 질문

1개의 답변

0 추천
예전에 타원 원으로 크롭 하는것을 누군가 의뢰 받아서 해드린적이 있는데..

크롭후 나머지는 투명처리...

비트맵으로 하는것도 있었지요

그냥 무작정 가이드 부탁드린다고 쓰시면 아마도 좋은댓글은 어려워보입니다...;;

구글링을 해보시면 아마 좋은 소스 파일이 많을거에요

 

doridori2013@nate.com
익명사용자 님이 2015년 5월 17일 답변
이새끼 사기꾼입니다 조심하세여 ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ
잘사는가베 개라슥아
...