@swarmtechnology/gimmeimage
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

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 sync

or, if you use yarn...

yarn add @swarmtechnology/gimmeimage
npx cap sync

API

gimmeMediaItem(...)

gimmeMediaItem(options?: GimmeOptions) => Promise<MediaAsset>

Get media item from camera roll referenced by the platform specific identifier.

Param Type
options GimmeOptions

Returns: Promise<MediaAsset>


savePhoto(...)

savePhoto(options?: MediaSaveOptions) => Promise<PhotoResponse>
Param Type
options MediaSaveOptions

Returns: Promise<PhotoResponse>


Interfaces

MediaAsset

Prop Type Description
identifier string Platform-specific identifier
data string Data for a photo asset as a base64 encoded string (JPEG only supported)
creationDate string ISO date string for creation date of asset
fullWidth number Full width of original asset
fullHeight number Full height of original asset
thumbnailWidth number Width of thumbnail preview
thumbnailHeight number Height of thumbnail preview
type string Type of asset
location MediaLocation Location metadata for the asset

MediaLocation

Prop Type Description
latitude number GPS latitude image was taken at
longitude number GPS longitude image was taken at
heading number Heading of user at time image was taken
altitude number Altitude of user at time image was taken
speed number Speed of user at time image was taken

GimmeOptions

Prop Type Description
identifier string Platform-specific identifier

PhotoResponse

Prop Type
filePath string

MediaSaveOptions

Prop Type
path string
album string

Readme

Keywords

Package Sidebar

Install

npm i @swarmtechnology/gimmeimage

Weekly Downloads

10

Version

0.0.5

License

MIT

Unpacked Size

38.5 kB

Total Files

27

Last publish

Collaborators

  • hashtobewild