2022.2

Table Of Contents
Camera
cotgPhotoWidget([
options
])
options
Optional.Anarraycontainingthedesiredsettings,e.g.{quality:50,height:1024,width:1024}.Forany
unspecifiedoptionsthedefaultsettingswillbeused.
InitializethenewCameraelementwithanysettingsthatyouwanttobedifferentfromthedefaults.
Example: $('#myCamera').cotgPhotoWidget({quality: 50, height: 1024});
Howtochangethedefaultsettingsisexplainedinanothertopic:"Changingdefaultsettingsforwidgets"
onpage547.
Option Description Type Default
editimage
Allowstheusertoedittheimageaftertakingorselectingit.Whichediting
optionstheuseractuallygetsandhowtheyarepresenteddependsonthe
operatingsystemofthedevice.
Boolean false
encodingtype
Thereturnedimage'sfileencoding:jpgorpng. String 'jpg'
height
Themaximumheightinpixels Number 864
width
Themaximumwidthinpixels. Number 1152
source
Whichbuttonsareenabled:Takenow(take),Library(pick),orboth(takeand-
pick).
String 'takeandpick'
scaleimage
Scalestheimagetofitthemaximumwidthorheight.Theaspectrationismain-
tained.
Boolean true
quality
Qualityofthesavedimage,expressedasarangeof0-100,where100isfullres-
olutionwithnolossfromfilecompression.
Number 80
allowannotations
AddsanImage&Annotationwidgettoeditthepicture. Boolean false
allowdeskew
Allowstheusertoperformaperspectivecroppingaftertakingorselectingapic-
ture.
Boolean false
addtimestamp
Addsatimestamp Boolean false
stampFormat
Thedateformat.ForallpossibleformatsseeCordovadocumentation.'L'stands
forlocalizeddateandtime.
String 'L'
Page 558