/*** 将图片转换成十六进制字符串* @param photo* @return*/public static String sendPhoto(ImageView photo) {Drawable d = photo.getDrawable();Bitmap bitmap=((BitmapDra...
分类:
移动开发 时间:
2014-09-03 19:41:37
阅读次数:
280
在所有具有性能优化的数据结构中,我想大家使用最多的就是hash表,是的,在具有定位查找上具有O(1)的常量时间,多么的简洁优美,但是在特定的场合下:①:对10亿个不重复的整数进行排序。②:找出10亿个数字中重复的数字。当然我只有普通的服务器,就算2G的内存吧,在这种场景下,我们该如何更好的挑选数据结...
分类:
其他好文 时间:
2014-09-02 22:45:25
阅读次数:
968
package com.camera;import java.io.IOException;import java.lang.reflect.Method;import android.app.Activity;import android.graphics.Bitmap;import androi...
分类:
其他好文 时间:
2014-09-02 17:14:25
阅读次数:
355
在Android应用里,最耗费内存的就是图片资源。而且在Android系统中,读取位图Bitmap时,分给虚拟机中的图片的堆栈大小只有8M,如果超出了,就会出现OutOfMemory异常。所以,对于图片的内存优化,是Android应用开发...
分类:
移动开发 时间:
2014-09-01 17:59:24
阅读次数:
285
1、bitmap保存到SQLite中数据格式:db.execSQL("Createtableexpress(_idINTEGERPRIMARYKEYAUTOINCREMENT,express_novarchar(100),express_nameTEXT,express_imgBLOB);");2、bitmap变为BlobContentValuesvalues=newContentValues();finalByteArrayOutputStreamos=newByteArrayOu..
分类:
数据库 时间:
2014-09-01 15:57:13
阅读次数:
327
Description
Shuffling the pixels in a bitmap image sometimes yields random looking images. However, by repeating the shuffling enough times, one finally recovers the original images. This should ...
分类:
其他好文 时间:
2014-09-01 15:39:53
阅读次数:
230
在android sdk 1.6版本API帮助文档中,其中关于BitmapFactory.decodeFactory.decodeStream(InputStream is)的帮助文档是这么说明的: Bitmap android.graphics.BitmapFactory.decodeStream...
分类:
移动开发 时间:
2014-08-30 18:56:49
阅读次数:
257
1 // 将Bitmap转换成InputStream(压缩率quality、100表示不压缩、10表示压缩90%) 2 public InputStream Bitmap2InputStream(Bitmap bm, int quality) { 3 ...
分类:
移动开发 时间:
2014-08-30 11:13:19
阅读次数:
323
在2.5亿个整数中找出不重复的整数,注,内存不足以容纳这2.5亿个整数。思路: bitmap用一个bit来代表存在还是不存在,现在我们要判断重不重复,则需要三个状态:不存在,存在一个,存在多个。2bits可以表示四个状态,令00表示不存在,01表示存在1个,10表示存在多个,11无意义。 令2b.....
分类:
其他好文 时间:
2014-08-30 11:09:39
阅读次数:
228
一种是直接对Bitmap的像素进行操作,如:叠加、边框、怀旧、(高斯)模糊、锐化(拉普拉斯变换)。Bitmap.getPixels(srcPixels, 0, width, 0, 0, width, height); newR = (int) (pixR * alpha + layR * (1 -....
分类:
编程语言 时间:
2014-08-29 21:20:58
阅读次数:
382