[android-developers] Re: Problem saving canvas to file

2009-01-05 Thread Mike Reed
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. b = Bitmap.createBitmap(...); c = new Canvas(b); // now draw into c, e.g. c.drawBitmap(...), etc. b.compress(...); On Jan 4

[android-developers] Re: Problem saving canvas to file

2009-01-04 Thread Protocol-X
if i change "Picture newPicture = Picture.createFromStream(in); " to "Picture newPicture = new Picture();" it does not restart the app but the image is black and only 150 bytes On Jan 4, 12:41 pm, Protocol-X wrote: > I gave it a try and all it does is make the app restart with no > error. > >

[android-developers] Re: Problem saving canvas to file

2009-01-04 Thread Protocol-X
I gave it a try and all it does is make the app restart with no error. On Jan 4, 12:09 pm, "Sergey Ten" wrote: > I have not tried it myself, but looks like you can use Picture class. > E.g: > >       �...@override protected void onDraw(Canvascanvas) { > >                 FileInputStream in = nul

[android-developers] Re: Problem saving canvas to file

2009-01-04 Thread Protocol-X
oh i know i just had them commented out and threw it in seperate throws to paste in here thanks ill give it a try On Jan 4, 12:09 pm, "Sergey Ten" wrote: > I have not tried it myself, but looks like you can use Picture class. > E.g: > >       �...@override protected void onDraw(Canvascanvas) { >

[android-developers] Re: Problem saving canvas to file

2009-01-04 Thread Sergey Ten
I have not tried it myself, but looks like you can use Picture class. E.g: @Override protected void onDraw(Canvas canvas) { FileInputStream in = null; try { in = new FileInputStream("myimage.jpg");