Bitmap - 称作位图,一般位图的文件格式后缀为bmp,当然编码器也有很多如RGB565、RGB888。作为一种逐像素的显示对象执行效率高,但是缺点也很明显存储效率低。我们理解为一种存储对象比较好。 Drawable - 作为Android平下通用的图形对象,它可以装载常用格式的图像,比如GIF...
分类:
移动开发 时间:
2014-11-23 23:07:59
阅读次数:
314
Android 使用NDK处理BItmap及如何通过C/C++直接控制View的suface显示,学习笔记及方向...
分类:
移动开发 时间:
2014-11-23 16:01:28
阅读次数:
246
一、Bitmap转DrawableBitmap mBitMap=getYourBitMap(); //getYourBitMap()是你获取BitMap的方法 BitmapDrawable mBitDrawable=new BitmapDrawable(mBitMap); //BtimapDrawa...
分类:
其他好文 时间:
2014-11-23 01:55:34
阅读次数:
182
通过Imageview显示网络传回来的byte数据,发现内存会不断增大,最终导致内存溢出。于是手动去回收Bitmap的数据,发现会main ex (Canvas: trying to use a recycled bitmap)
网上查询下,发现重新Imageview的onDraw时,在super执行try
catch,发现解决了问题,这样不必手动bitmap.recycled(),...
分类:
移动开发 时间:
2014-11-22 23:10:15
阅读次数:
210
方法1. 使用CBitmap
CBitmap m_bitmap;
m_bitmap.LoadBitmap(IDB_BITMAP1);
HBITMAP hBitmap = (HBITMAP)m_bitmap.GetSafeHandle();
((CButton *)GetDlgItem(IDC_BUTTON1))->SetBitmap(hBitmap);
方法2. 使用CBitmapBu...
分类:
其他好文 时间:
2014-11-21 19:00:34
阅读次数:
463
首先让我们理解下Android平台中的显示类是View,但是还提供了底层图形类android.graphics,今天所说的这些均为graphics底层图形接口。 Bitmap - 称作位图,一般位图的文件格式后缀为bmp,当然编码器也有很多如RGB565、RGB888。作为一种逐像素的显示对象执行效...
分类:
移动开发 时间:
2014-11-21 18:11:43
阅读次数:
207
package com.example.customshapedemo;import android.content.Context;import android.content.res.TypedArray;import android.graphics.Bitmap;import android...
分类:
其他好文 时间:
2014-11-20 18:26:22
阅读次数:
217
View组件显示的内容可以通过cache机制保存为bitmap, 主要有以下方法:
void setDrawingCacheEnabled(boolean flag),
Bitmap getDrawingCache(boolean autoScale),
void buildDrawingCache(boolean autoScale...
分类:
移动开发 时间:
2014-11-19 01:33:41
阅读次数:
231
public Bitmap getWebBitmap(String imgUrl) { Bitmap bitmap =null; try { InputStream inputStream = null; URL url; ...
分类:
移动开发 时间:
2014-11-19 00:05:49
阅读次数:
246
//图片进行灰度处理 //originalImage为原图像 返回灰度图像 private Bitmap GrayImage(Bitmap originalImage) { ImageAttributes image...