开发者

converting canvas into bitmap in android

开发者 https://www.devze.com 2023-01-21 04:38 出处:网络
I am trying to develope an app on canvas ,i am drawing a bitmap 开发者_如何学Con canvas with the help of canvas.drawBitmap().After that i want to convert that canvas into bitmap.

I am trying to develope an app on canvas ,i am drawing a bitmap 开发者_如何学Con canvas with the help of canvas.drawBitmap().After that i want to convert that canvas into bitmap.

can anyone give me suggession

thanking you in advance


toDataURL() would be great, if it worked in Android. Please star this issue! http://code.google.com/p/android/issues/detail?id=7901


i suggest you look to the method toDataURL to obtain an image, but i doubt it while provide a bmp file, more likely to be png.

More info here : https://developer.mozilla.org/en/DOM/HTMLCanvasElement


first of all these treat as a view including canvas and then here we need to use the screen capture concept of android we need to use a method decorView() and it returns a one bitmap object.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号