b2.setOnClickListener(new OnClickListener() { public void onClick(View v) { setContentView(R.layout.new_main); String editTextStr = text.getText().toString(); Toast msg = Toast.makeText(getBaseContext(),"/sdcard/Stored_Images/" + editTextStr + ".jpg", Toast.LENGTH_LONG); msg.show(); Bitmap bmp = BitmapFactory.decodeFile("/sdcard/Stored_Images/" + editTextStr + ".jpg"); ImageView img = (ImageView) findViewById(R.id.ImageView01); img.setImageBitmap(bmp); } });
In the above code, the image on the screen that is saved on the SD card is displayed.
Canvas c = holder.lockCanvas(); c.drawARGB(255,0,0,0); onDraw(c); holder.unlockCanvasAndPost(c);
This code creates a canvas for drawing (black screen).
I want to combine the two to set / display the image as a canvas so that I can draw it. Therefore, if I take a picture of someoneβs face, I want to be able to display this image so that I can draw a mustache or something on it.
source share