package xiaosi.grivaty; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics... ...
分类:
移动开发 时间:
2017-04-17 12:54:55
阅读次数:
234
[java] view plain copy mPaint = new Paint(); mPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SCREEN)); [java] view plain copy [java] view pl ...
分类:
移动开发 时间:
2017-04-17 12:49:39
阅读次数:
163
/** * 将图片文件原比例缩略。并使其不超过最大宽、高 * @param path : 图片文件 * @param requestW : 缩略后最大宽度 * @param requestH : 缩略后最大高度 * @return 缩略后图片对象 */ public static Bitmap ge ...
分类:
移动开发 时间:
2017-04-16 12:05:20
阅读次数:
203
CSharpGL(41)改进获取字形贴图的方法 在(http://www.cnblogs.com/bitzhuwei/p/CSharpGL-28-simplest-way-to-creating-font-bitmap.html)中我实现了纯C#获取字形贴图的方法。 最近发现这个方法有些缺陷: 单纯 ...
分类:
其他好文 时间:
2017-04-14 09:55:44
阅读次数:
270
//屏幕宽 int iWidth = Screen.PrimaryScreen.Bounds.Width; //屏幕高 int iHeight = Screen.PrimaryScreen.Bounds.Height; //按照屏幕宽高创建位图 Image img = new Bitmap(iWid ...
public string Recognize(Bitmap image) { string text = string.Empty; var barcodeReader = new BarcodeReader(); var options = new DecodingOptions(); ... ...
分类:
其他好文 时间:
2017-04-13 16:38:29
阅读次数:
155
1 int count = 0; 2 int success_count = 0; 3 foreach (string gen in fn_gen) 4 { 5 //MessageBox.Show(gen); 6 Bitmap Bi = new Bitmap(gen); //使用打开的图片路径创建位... ...
将drawable下的图片转换成bitmap 1、 Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.xxx); 2、Resources r = this.getContext().getResources ...
分类:
移动开发 时间:
2017-04-11 12:06:31
阅读次数:
204
内存泄漏主要有几大情景: 1,activity泄漏 2,静态常量泄漏 静态变量长期维持到大数据对象的引用,阻止垃圾回收 3,资源未关闭泄漏 资源性对象如Cursor、Stream、Socket,Bitmap 4,注册反注册泄漏 我们常常写很多的Listener,未反注册会导致观察者列表里维持着对象的 ...
分类:
其他好文 时间:
2017-04-11 01:30:43
阅读次数:
244
我们可以通过下面的代码看出每个应用程序最高可用内存是多少 BitmapFactory这个类提供了多个解析方法(decodeByteArray, decodeFile, decodeResource等)用于创建Bitmap对象,我们应该根据图片的来源选择合适的方法。比如SD卡中的图片可以使用decod ...
分类:
移动开发 时间:
2017-04-08 23:45:00
阅读次数:
233