http://blog.naver.com/skcjs84?Redirect=Log&logNo=90089483420
http://stackoverflow.com/questions/3107527/android-save-view-to-jpg-or-png
밑의 예제는 null포인터 오류남..쓰불..도저히 모르겠다..
http://stackoverflow.com/questions/3107527/android-save-view-to-jpg-or-png
밑의 예제는 null포인터 오류남..쓰불..도저히 모르겠다..
would like to write an android app that basically layers an overlay on image on another image and then I would like to save the picture with the overlay as a jpg or png. Basically this will be the whole view that I would like to save. Sample code would be very helpful. EDIT: I tried out your suggestions and am getting a null pointer at the Starred Line.
| |||||||||||
|
up vote 1 down vote accepted
+150 |
You can take advantage of a View's drawing cache.
Where view is your View. The 95 is the quality of the JPG compression. And the file output stream is just that. | ||||||||||||
|
up vote 0 down vote |
Use fos reference as a 3rd parameter of b.compress() method in Moncader's answer. The image will be stored as image.jpg in root directory of your sd card. |
'Android > Tip&Tech' 카테고리의 다른 글
canvas 화면을 Bitmap으로 저장 완결판.. (0) | 2010.11.23 |
---|---|
이벤트 핸들러 - 여러 가지 이벤트 (0) | 2010.11.23 |
안드로이드 카메라 제어 참고부분 (0) | 2010.11.23 |
Android에서 View를 bitmap으로 정장하는법 (0) | 2010.11.22 |
Android View.getDrawingCache() 분석 (0) | 2010.11.22 |