开发者

How to change selected region with original color?

I have 1 Bitmap image and i had converted that image into grayscale. My problem is I have to change the selected region of image with the original color. For that i am using getPixel() and setPixel() function on 开发者_C百科canvas in onDraw() method. I got the region also using onTouch method but i am unable to save the bitmap.

Please Help me

Thanks


Do the following to store a bitmap on android (e.g. as a png):

Bitmap bitmap = Bitmap.createBitmap(source, x, y, width, height...);
FileOutputStream fos = new FileOutputStream("/some/place/bla.png"));
target.compress(CompressFormat.PNG, 100, fos);
fos.flush();
fos.close();
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜