Bitmap.createBitmap函数有6个重载方法
来源:互联网 发布:mac ape 打开格式 编辑:程序博客网 时间:2024/06/05 15:35
- public static Bitmap createBitmap(Bitmap src)
从原位图src复制出一个新的位图,和原始位图相同 - public static Bitmap createBitmap(int[] colors, int width, int height, Bitmap.Config config)
这个函数根据颜色数组来创建位图,注意:颜色数组的长度>=width*height
此函数创建位图的过程可以简单概括为为:更加width和height创建空位图,然后用指定的颜色数组colors来从左到右从上至下一次填充颜色。config是一个枚举,可以用它来指定位图“质量”。 - public static Bitmap createBitmap(int[] colors, int offset, int stride, int width, int height, Bitmap.Config config)
此方法与2类似,但我还不明白offset和stride的作用。 - public static Bitmap createBitmap(Bitmap source, int x, int y, int width, int height, Matrix m, boolean filter)
从原始位图剪切图像,这是一种高级的方式。可以用Matrix(矩阵)来实现旋转等高级方式截图
参数说明:
Bitmap source:要从中截图的原始位图
int x:起始x坐标
int y:起始y坐标
int width:要截的图的宽度
int height:要截的图的宽度
Bitmap.Config config:一个枚举类型的配置,可以定义截到的新位图的质量
返回值:返回一个剪切好的Bitmap - public static Bitmap createBitmap(int width, int height, Bitmap.Config config)
根据参数创建新位图 - public static Bitmap createBitmap(Bitmap source, int x, int y, int width, int height)
简单的剪切图像的方法,可以参考上面的4.
0 0
- Bitmap ---Bitmap.createBitmap函数有6个重载方法
- Bitmap.createBitmap函数有6个重载方法
- Bitmap.createBitmap函数有6个重载方法
- (转)Bitmap.createBitmap函数有6个重载方法
- Bitmap.createBitmap函数有6个重载方法
- Bitmap.createBitmap函数有6个重载方法
- Bitmap.createBitmap函数有6个重载方法
- Bitmap.createBitmap函数有6个重载方法
- Bitmap.createBitmap函数有6个重载方法
- Bitmap.createBitmap函数有6个重载方法
- Bitmap.createBitmap函数有6个重载方法
- Bitmap.createBitmap函数有6个重载方法
- Bitmap.createBitmap函数6个重载方法
- Bitmap.createBitmap的6个重载方法
- Bitmap.createBitmap函数用法
- Bitmap.creatBitmap的6个重载方法
- C#有关Split 方法有6个重载函数
- Bitmap.createBitmap
- 2012年关于优秀工程师的思考
- maven管理Java web项目WEB-INF/lib中jar包不能被引入的问题解决
- 微信jsapi支付开发遇到的坑
- Web开发技术
- (int&) 和 (int)的区别(转载)
- Bitmap.createBitmap函数有6个重载方法
- CodeForces 38B Chess
- 堆,优先队列以及堆排序
- 不就是一个订票网站吗,12306的核心模型设计思路究竟复杂在哪儿?
- hdu 1879
- Perfect Squares
- PHP面向对象开发,关于调用父类构造器的问题
- 基于layer mobile手机端弹出框,询问框(PC端推荐layer和artDialog:http://download.csdn.net/download/cometwo/9437895)
- iOS将产品进行多语言发布,开发