Some utility methods to work with images.
Resize and crop a Ti.Blob
image to fill width
and height
. The second arguments can also be an object with:
width
height
hires
: Set toFALSE
to disable adjusting target dimensions to actual pixels needed for Retina or Android variable DPI.fix
: Set toFALSE
to disable the workaround for bug TIMOB-4865.
Convert from dp to px. Give it a number or an object that has a width
and/or height
property.
Let the use choose to take or select a picture. If no camera is found it does not ask but let the user select. By default it wants a photo and calls callback(err, media)
but you can leave out the callback (just as you can leave out options) and pass params to call showCamera
or openPhotoGallery
with to have full control.