2012-03-19 19 views
0

デバイスカメラで撮影した既存の画像上にImageViewで画像を表示してから、ズーム、回転、ボタンをクリックしたいと思ったときにその最初の画像を修正したい画像がそのまま残っているということは、画像がそのボタンのクリックでカメラのキャプチャされた画像に貼り付けられることを意味します...今は、ボタンクリックでその画像を貼り付ける方法を知りたいだけです。アンドロイドの別の画像に貼り付けた画像

public class Camera_finalActivity extends Activity implements OnTouchListener { 

    @Override 
    public void onCreate(Bundle savedInstanceState) { 
    super.onCreate(savedInstanceState); 

    setContentView(R.layout.main); 
    view = (ImageView) findViewById(R.id.imageView); 
    view.setOnTouchListener(this); 

    Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); 
    startActivityForResult(cameraIntent,100); 

    } 

    @Override 
    protected void onActivityResult(int requestCode, int resultCode, Intent data) { 
     super.onActivityResult(requestCode, resultCode, data); Bundle extras = data.getExtras(); 
     Bitmap b = (Bitmap) extras.get("data"); 
     int width = b.getWidth(); 
     final int height = b.getHeight(); 
     img1 = (ImageView)findViewById(R.id.imageView1); 
     img1.setImageBitmap(b); 

    btn = (Button)findViewById(R.id.button1); 
    btn.setOnClickListener(new OnClickListener() { 

     @Override 
     public void onClick(View arg0) { 

//want some code here to paste the image on camera captured image.... 

     } 
    }); 

} 
//here was the code to zoom and rotate the image...... 

    } 

答えて

0

は...

JSTは、今私がしたい

+0

...

 @Override public void onClick(View arg0) { view.setOnTouchListener(null); } 

をクリックして画像を保存するためにスクリーンショットを撮るウルのボタンに次のコードを、それを入れてしまいました私のSDカードに私の編集した画像を保存する...私は何をすべきか..... – Rahulkapil

関連する問題