Bitmap
来源:互联网 发布:无敌淘宝网免费全文 编辑:程序博客网 时间:2024/06/06 01:02
http://www.cnblogs.com/igrl/archive/2010/07/30/Bitmap_createBitmap.html
Bitmap.createBitmap函数
- 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.Configconfig)
此方法与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.
ARGB_8888、ALPHA_8、ARGB_4444、RGB_565的理解
http://blog.csdn.net/wulongtiantang/article/details/8481077
0 0
- Bitmap
- bitmap
- Bitmap
- bitmap
- bitmap
- BitMap
- BITMAP
- Bitmap
- Bitmap
- Bitmap
- Bitmap
- bitmap
- Bitmap
- Bitmap
- bitmap
- bitmap
- Bitmap
- Bitmap
- java的System.getProperty()方法可以获取的值
- 用NFS挂载时参数解析及uboot设置
- PHP函数篇之( mysql_real_escape_string 与 addslashes )的区别
- Trunk、Hybrid、Access、Tag、Untag、Pvid的关系
- 导致内存溢出的原因有哪些?内存溢出问题又如何解决
- Bitmap
- 九度题目1185
- java socket服务器端例子
- ini文件读写,适合大量输出。
- linux c检测USB热插拔(netlink)
- ROC曲线
- 在百度地图API中使用getOverlays方法遇到的问题及其解决方案
- IOS 公司开发者账号申请详细教程
- 数据结构---树形结构