Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Saving image from SurfaceView

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 51
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi !

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

Regards Przemek
 
Manny Hernandez
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Would it be as fast as SurfaceView?
 
Przemek Boryka
Ranch Hand
Posts: 51
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
What are your superhero powers? Go ahead and try them on this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic