1- import observable = require ( "tns-core-modules/data/observable" ) ;
2- import imagesource = require ( "tns-core-modules/image-source" ) ;
3- import imageAssetModule = require ( "tns-core-modules/image-asset" ) ;
1+ import { Observable } from "tns-core-modules/data/observable" ;
2+ import { ImageSource } from "tns-core-modules/image-source" ;
3+ import { ImageAsset } from "tns-core-modules/image-asset" ;
44
55export interface ImageOptions {
66 /**
@@ -19,7 +19,13 @@ export interface ImageOptions {
1919 aspectRatio ?: "fill" | "fit" ;
2020}
2121
22- export class SelectedAsset extends imageAssetModule . ImageAsset {
22+ export class SelectedAsset extends ImageAsset {
23+ /**
24+ * A 100x100 pixels thumb of the selected image.
25+ * This property will be initialized on demand. The first access will return undefined or null.
26+ * It will trigger an async load and when the thumb is obtained, a property changed notification will occur.
27+ */
28+ thumb : ImageSource ;
2329
2430 /**
2531 * URI that identifies the image asset.
@@ -39,7 +45,7 @@ export class SelectedAsset extends imageAssetModule.ImageAsset {
3945 * Asynchronously retrieves an ImageSource object that represents this selected image.
4046 * Scaled to the given size. (Aspect-ratio is preserved by default)
4147 */
42- getImage ( options ?: ImageOptions ) : Promise < imagesource . ImageSource > ;
48+ getImage ( options ?: ImageOptions ) : Promise < ImageSource > ;
4349
4450 /**
4551 * Asynchronously retrieves an ArrayBuffer that represents the raw byte data from this selected image.
@@ -92,6 +98,13 @@ interface Options {
9298 */
9399 albumsText ?: string ;
94100
101+ android ?: {
102+ /**
103+ * Provide a reason for permission request to access external storage on api levels above 23.
104+ */
105+ read_external_storage ?: string ;
106+ } ;
107+
95108 /**
96109 * Indicates images should be sorted newest-first (iOS only, default false).
97110 */
0 commit comments