0.0.5 • Published 2 years ago
Share package gimmeimage A capacitor plugin that lets you get an unadultered image (in Base64) using the platform specific identifier. This is early-days in the dev and it problably does not work off-the-shelf.
Install npm install @swarmtechnology/gimmeimage
npx cap syncor, if you use yarn...
yarn add @swarmtechnology/gimmeimage
npx cap syncAPI gimmeMediaItem(...) gimmeMediaItem(options?: GimmeOptions) => Promise<MediaAsset>Get media item from camera roll referenced by the platform specific identifier.
Param Type optionsGimmeOptions
Returns: Promise<MediaAsset>
savePhoto(...) savePhoto(options?: MediaSaveOptions) => Promise<PhotoResponse>Param Type optionsMediaSaveOptions
Returns: Promise<PhotoResponse>
Interfaces MediaAsset Prop Type Description identifierstring Platform-specific identifier datastring Data for a photo asset as a base64 encoded string (JPEG only supported) creationDatestring ISO date string for creation date of asset fullWidthnumber Full width of original asset fullHeightnumber Full height of original asset thumbnailWidthnumber Width of thumbnail preview thumbnailHeightnumber Height of thumbnail preview typestring Type of asset locationMediaLocation Location metadata for the asset
MediaLocation Prop Type Description latitudenumber GPS latitude image was taken at longitudenumber GPS longitude image was taken at headingnumber Heading of user at time image was taken altitudenumber Altitude of user at time image was taken speednumber Speed of user at time image was taken
GimmeOptions Prop Type Description identifierstring Platform-specific identifier
PhotoResponse MediaSaveOptions Prop Type pathstring albumstring