File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Android and the fly likes Saving image from SurfaceView Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "Saving image from SurfaceView" Watch "Saving image from SurfaceView" New topic
Author

Saving image from SurfaceView

Manny Hernandez
Greenhorn

Joined: Oct 31, 2009
Posts: 11
I've exhausted all gooogle-search efforts on looking
for a solution for this one. I'm currently developing
an app that draws on the screen as you drag your
fingers. I've done this successfully with a SurfaceView
but the project requires it to be saved to a file.

However, when I do try to save the image, it only
saves a black screen(which is usually the issue
when people try to do this).

Apparently you can do this using a View, and I've
somehow managed a work-around to do this. The
problem is with my solution, the application runs
to a crawl. So using the View is not acceptable.

Please help.

P.S.
I would include code, but I've made so much changes
to it that all remnants of the one with a SurfaceView
is gone. (I'll try to rewrite it again if I have to for
a solution for this)

Thanks.
Przemek Boryka
Ranch Hand

Joined: Dec 06, 2011
Posts: 51

Hi !

Take a look at this : Saving View to Bitmap, maybe this will help you.

Regards Przemek
Manny Hernandez
Greenhorn

Joined: Oct 31, 2009
Posts: 11
Would it be as fast as SurfaceView?
Przemek Boryka
Ranch Hand

Joined: Dec 06, 2011
Posts: 51

Hi !

The SurfaceView is faster then View, but slower then the OpenGL library . Take a look at this :

2D Graphics Android

then look at this --> OpenGL

And answer yourself on your question

Bye. Greetings from Poland
Manny Hernandez
Greenhorn

Joined: Oct 31, 2009
Posts: 11
Thank you for the suggestions, but... I still fail to see how this would
help the problem: saving from SurfaceView.

Hmm... It could be that I just made a bad decision for my solution
for view. So I'll probably create a new thread for that.
 
Consider Paul's rocket mass heater.
 
subject: Saving image from SurfaceView
 
Similar Threads
Creating a viewport on a SurfaceView
odd framelayout/surfaceview problem
reading XML layout contains a SurfaceView
how to put button inside a SurfaceView and on the bootom of the screen?
[Solved] Clear SurfaceView