Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

auto crop image

When the camera has taken a picture is there a way to auto crop the image and reduce the filesize of the image?

Also, takeScreenshot() causes my app to close.

— asked May 2nd 2010 by Justin Hall
  • camera
  • image
  • iphone
  • media
0 Comments

3 Answers

  • If you set the 'allowEditing:true' properties when you launch the camera, the user will be asked to scale/crop the photo to a square, which results in a much smaller image and filesize.

    — answered May 2nd 2010 by Kosso
    permalink
    0 Comments
  • Thanks Kosso,

    I really want to do the cropping and resizing automatically on success of the takePicture() command.

    Thanks!

    — answered May 2nd 2010 by Justin Hall
    permalink
    0 Comments
  • Hi,

    I'm pretty sure that's not possible, unless you find a way to manipulate the Blob in the background.

    But to honest, it's probably best to let your users do the copping and resizing, as it's pretty much expected behavior in most apps which do that kind of thing. Even with the native apps which come with the devices etc (Adding photos to contacts, for example) People are pretty used to doing it ;)

    — answered May 3rd 2010 by Kosso
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.