MediaStore.Images.Media.InsertImage Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| InsertImage(ContentResolver, Bitmap, String, String) |
Insert an image and create a thumbnail for it. |
| InsertImage(ContentResolver, String, String, String) |
Insert an image and create a thumbnail for it. |
InsertImage(ContentResolver, Bitmap, String, String)
Insert an image and create a thumbnail for it.
[Android.Runtime.Register("insertImage", "(Landroid/content/ContentResolver;Landroid/graphics/Bitmap;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "")]
public static string? InsertImage(Android.Content.ContentResolver? cr, Android.Graphics.Bitmap? source, string? title, string? description);
[<Android.Runtime.Register("insertImage", "(Landroid/content/ContentResolver;Landroid/graphics/Bitmap;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "")>]
static member InsertImage : Android.Content.ContentResolver * Android.Graphics.Bitmap * string * string -> string
Parameters
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
The URL to the newly created image, or null if the image failed to be stored for any reason.
- Attributes
Remarks
This method was deprecated in API level 29. inserting of images should be performed using MediaColumns.IS_PENDING, which offers richer control over lifecycle.
Insert an image and create a thumbnail for it.
Android reference for android.provider.MediaStore.Images.Media.insertImage.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
InsertImage(ContentResolver, String, String, String)
Insert an image and create a thumbnail for it.
[Android.Runtime.Register("insertImage", "(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "")]
public static string? InsertImage(Android.Content.ContentResolver? cr, string? imagePath, string? name, string? description);
[<Android.Runtime.Register("insertImage", "(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "")>]
static member InsertImage : Android.Content.ContentResolver * string * string * string -> string
Parameters
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
The URL to the newly created image
- Attributes
Exceptions
Remarks
This method was deprecated in API level 29. inserting of images should be performed using MediaColumns.IS_PENDING, which offers richer control over lifecycle.
Insert an image and create a thumbnail for it.
Android reference for android.provider.MediaStore.Images.Media.insertImage.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.