Android - Resizing images opened by photo picker
devin_asay at byu.edu
Wed Mar 27 16:59:28 CDT 2013
On Mar 21, 2013, at 3:15 PM, Monte Goulding wrote:
> On 22/03/2013, at 8:08 AM, Devin Asay <devin_asay at byu.edu> wrote:
>> The mobilePickPhoto command lets you choose a photo either from the device's photo gallery library or take a photo with the camera. In iOS mobilePickPhoto has two optional parameters that let you limit the maximum width and size of the chosen image, but that isn't implemented on Android. I've been trying to find a way to do a similar thing on Android. I tried resizing the last image object after picking the photo, but the chosen image always ends up filling up the entire screen, and then some.
>> Has anyone found a way to set the size of a photo opened in Android when using mobilePickPhoto?
> First off you probably want to set the visible of the templateImage to false before mobilePickPhoto. Set the lockLoc too then resize proportionally using the formattedWidth and height of the image after the import. You may also want to try setting the resizeQuality to good.
This finally worked for me:
set the visible of the templateimage to false
set the resizeQuality of the templateimage to "good"
set the height of last image to 480
set the width of last image to 640
set the loc of last image to the screenloc
show last image
Thanks for the pointer, Monte.
Office of Digital Humanities
Brigham Young University
More information about the use-livecode