0.0.5 • Published 3 months ago

@swarmtechnology/gimmeimage v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

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.

ParamType
optionsGimmeOptions

Returns: Promise<MediaAsset>


savePhoto(...)

savePhoto(options?: MediaSaveOptions) => Promise<PhotoResponse>
ParamType
optionsMediaSaveOptions

Returns: Promise<PhotoResponse>


Interfaces

MediaAsset

PropTypeDescription
identifierstringPlatform-specific identifier
datastringData for a photo asset as a base64 encoded string (JPEG only supported)
creationDatestringISO date string for creation date of asset
fullWidthnumberFull width of original asset
fullHeightnumberFull height of original asset
thumbnailWidthnumberWidth of thumbnail preview
thumbnailHeightnumberHeight of thumbnail preview
typestringType of asset
locationMediaLocationLocation metadata for the asset

MediaLocation

PropTypeDescription
latitudenumberGPS latitude image was taken at
longitudenumberGPS longitude image was taken at
headingnumberHeading of user at time image was taken
altitudenumberAltitude of user at time image was taken
speednumberSpeed of user at time image was taken

GimmeOptions

PropTypeDescription
identifierstringPlatform-specific identifier

PhotoResponse

PropType
filePathstring

MediaSaveOptions

PropType
pathstring
albumstring
0.0.5

3 months ago

0.0.4

4 months ago

0.0.3

8 months ago

0.0.2

8 months ago

0.0.1

8 months ago