Hai i used onDraw() in My Application,i can view the images ins working fine.My problem is to save the images. here my code to draw the images,My problem is Mentioned below. protected void onDraw(Canvas canvas) { // TODO Auto-generated method stub
Paint paint = new Paint(); Bitmap myBitmap = BitmapFactory.decodeResource(getResources(),R.drawable.ban_background); Bitmap resizeImage1=Bitmap.createScaledBitmap(myBitmap,590,350,false); canvas.drawColor(Color.BLACK); canvas.drawBitmap(resizeImage1,10,5, null); Bitmap icon; try { // Get reference to AssetManager AssetManager mngr = getAssets(); // Create an input stream to read from the asset folder InputStream ins = mngr.open(imageName +".png"); icon = BitmapFactory.decodeStream(ins); Bitmap icon9=Bitmap.createScaledBitmap(icon,590,250,false); canvas.drawBitmap(icon9,1,60, null); } catch (IOException e) { e.printStackTrace(); } if(isCamera) { icon1 = BitmapFactory.decodeByteArray(pictureByte, 0,pictureByte.length); Bitmap resizeImage=Bitmap.createScaledBitmap(icon1,150,170,false); canvas.drawBitmap(resizeImage,400,100, null); } Bitmap toDisk = Bitmap.createBitmap(resizeImage1); canvas.setBitmap(toDisk); try { toDisk.compress(Bitmap.CompressFormat.JPEG, 100, new FileOutputStream(new File("/mnt/sdcard/arun.jpg"))); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } Bitmap toDisk = Bitmap.createBitmap(resizeImage1); Here i can Save the image (resizeImage1),i can passed the Single value only.i cannot access all pictures.i add many pictures in onDraw();how can i access all pictures in Canvas? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en