先看一下官网的API
insertImage
Added in
API level 1
String insertImage (ContentResolver cr, String imagePath, String name, String description)
Insert an image and create a thumbnail for it.
Parameters | |
---|---|
cr | ContentResolver : The content resolver to use |
imagePath | String : The path to the image to insert |
name | String : The name of the image |
description | String : The description of the image |
Returns | |
---|---|
String | The URL to the newly created image |
Throws | |
---|---|
FileNotFoundException |
insertImage
Added in
API level 1
String insertImage (ContentResolver cr, Bitmap source, String title, String description)
Insert an image and create a thumbnail for it.
Parameters | |
---|---|
cr | ContentResolver : The content resolver to use |
source | Bitmap : The stream to use for the image |
title | String : The name of the image |
description | String : The description of the image |
Returns | |
---|---|
String | The URL to the newly created image, or null if the image failed to be stored for any reason. |
insertImage主要用途是把相机照的照片插入的系统图库,样我现在用的是这。
官方翻译是“插入一个图片,并创建一个缩略图。”如果还有其他用途,请在评论交流一下。谢谢。。。