Your code does not change bitmapOrg, but does create a new bitmap (whatever bitmap the canvas is drawing into). I expect you want to compress *that* bitmap to a file.
<begin pseudo code> b = Bitmap.createBitmap(...); c = new Canvas(b); // now draw into c, e.g. c.drawBitmap(...), etc. b.compress(...); On Jan 4, 2009, at 8:26 AM, Protocol-X wrote: Ive been searching all ove on how to edit a image and save it. The only way i have come accross other than just changing the size or orientation is to use canvas. Now canvas works fine but i cannot seem to save the newley created image.. the image always returns the original image. @Override protected void onDraw(Canvas canvas) { FileInputStream in = null; try { in = new FileInputStream("myimage.jpg"); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } Bitmap bitmapOrg = BitmapFactory.decodeStream(in); int wd = bitmapOrg.getWidth(); int hd = bitmapOrg.getHeight(); canvas.drawBitmap(bitmapOrg, 0, 0, null); canvas.drawBitmap(bitmapOrg, wd, 0, null); canvas.drawBitmap(bitmapOrg, 0, hd, null); canvas.drawBitmap(bitmapOrg, wd, hd, null); canvas.save(); FileOutputStream fos = null; try { fos = new FileOutputStream("/sdcard/test.png"); } catch (FileNotFoundException e) { e.printStackTrace(); } bitmapOrg.compress(Bitmap.CompressFormat.PNG, 50, fos); try { fos.close(); } catch (IOException e) { e.printStackTrace(); } } --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---