[英]how to convert a paint image to bitmap
I am able to save the source image but not able save the image with colorfilter: paint.setColorFilter(new ColorMatrixColorFilter(cm));
我可以保存源图像,但不能使用colorfilter保存图像:
paint.setColorFilter(new ColorMatrixColorFilter(cm));
If this image is converted into bitmap it can be saved easily, but I don't know how to do this. 如果将此图像转换为位图,则可以轻松保存,但是我不知道该怎么做。 Is there anyone to give solution?
有没有人可以解决?
Since this new Canvas is backed by a Bitmap (point 3.), any drawing you do in this Canvas will become part of the new Bitmap (point 2.). 由于此新的画布由位图(第3点)支持,因此您在此画布中所做的任何图形都将成为新的位图(第2点)的一部分。 Now just call 'compress' on this Bitmap from point 2. and the bitmap will be saved as a jpg/png.
现在,只需从点2对该位图调用“压缩”,该位图将另存为jpg / png。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.