生成黑白画笔,android使用系统浏览器打开网页,将Bitmap图片存储在本地JPG文件的方法
2013-06-09 14:46
1176 查看
生成黑白画笔
Paint paint = new Paint();
ColorMatrix cm = new ColorMatrix();
cm.setSaturation(0);
ColorMatrixColorFilter f = new ColorMatrixColorFilter(cm);
paint.setColorFilter(f);
android使用系统浏览器打开网页
Uri uri = Uri.parse("http://www.baidu.com");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
MID.mid.startActivity(intent);
将Bitmap图片存储在本地JPG文件的方法
public static void saveBitmap(Bitmap im , String fileName)
{
try {
File file = new File(fileName);
BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(file));
im.compress(Bitmap.CompressFormat.JPEG, 80, bos);
bos.flush();
bos.close() ;
} catch (Exception e) {}
}
Paint paint = new Paint();
ColorMatrix cm = new ColorMatrix();
cm.setSaturation(0);
ColorMatrixColorFilter f = new ColorMatrixColorFilter(cm);
paint.setColorFilter(f);
android使用系统浏览器打开网页
Uri uri = Uri.parse("http://www.baidu.com");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
MID.mid.startActivity(intent);
将Bitmap图片存储在本地JPG文件的方法
public static void saveBitmap(Bitmap im , String fileName)
{
try {
File file = new File(fileName);
BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(file));
im.compress(Bitmap.CompressFormat.JPEG, 80, bos);
bos.flush();
bos.close() ;
} catch (Exception e) {}
}
相关文章推荐
- android学习笔记---53_采用网页设计软件界面,以及使用android系统内置的浏览器,利用js调用java方法
- Android使用WebView加载网页屏蔽系统浏览器的方法
- (使用android的图片浏览器打开已知路径的图片文件)Open an image using URI in Android's default gallery image viwer
- 当使用系统浏览器api打开网页不执行的解决方法
- Android中使用系统自带浏览器打开本地assets目录下的html文件
- android学习笔记---53_采用网页设计软件界面,以及使用android系统内置的浏览器,利用js调用java方法
- Android开发:使用Intent打开电话、短信、邮箱、本地文件等系统应用程序整理大全
- Android调用系统自带浏览器打开网页的实现方法
- Android开发:使用Intent打开电话、短信、邮箱、本地文件等系统应用程序整理大全
- android中使用BitmapFactory的decodeStream()方法解码图片失败问题
- android 网络图片路径解析和本地图片路径解析的方法 ,base64加密报文解析成bitmap【代码示例】
- 通过 Bitmap Font Generator 生成 fnt 与 png 文件供 cocos2d-x 中 LabelBMFont 使用达到以图片表现数字
- 通过 Bitmap Font Generator 生成 fnt 与 png 文件供 cocos2d-x 中 LabelBMFont 使用达到以图片表现数字
- Android 内存使用hprof文件打开方法
- 使用POI生成Excel文件及使用POI在EXCEL文件中插入图片的方法
- Android数据存储:获取网络图片把图片保存到SD卡中并从SDk卡中读取(通过Bitmap方法)
- Android使用Uri打开浏览器的方法
- android 7.0系统打开本地文件的问题android.os.FileUriExposedException:file:///storage/emulated/0/
- 如何将S/4HANA系统存储的图片文件用Java程序保存到本地
- android使用主流浏览器打开网页,无需弹出选择。