[TIMOB-16690] iOS: Add ability to provide the size parameters to TiMedia Camera API so the image could be sized natively
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Low |
Status | Closed |
Resolution | Done |
Resolution Date | 2016-12-27T13:43:52.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | APP-751978, supportTeam |
Reporter | Eduardo Gomez |
Assignee | Eric Merriman |
Created | 2014-03-25T03:13:46.000+0000 |
Updated | 2017-03-24T18:51:51.000+0000 |
Clarification for this request as requested by Dan.
New Feature - Resize the Image when its returned from the Titanium Camera Object:
In the answer to the stack overflow question they mention using the imagePickerController:didFinishPickingMediaWithInfo to resize the image appropriately when it is returned from the camera. We would like to be able to pass in a height and width to the Titanium Camera object and have the Titanium Camera logic resize the image with the imagePickerController:didFinishPickingMediaWithInfo on a background thread. When performing this resize the image data should not be stored to the disk. The idea is to perform this in native iOS instead of resizing it in javascript as our team does now which should save some memory and improve the stability of the Titanium Camera Object on iOS.Acceptance:
1. The Titanium Camera Object can be passed a height and/or width property. 2. Before the Titanium Camera Object passes the taken image back to the application it uses the imagePickerController:didFinishPickingMediaWithInfo method to resize the image to the passed in width and/or height properties in a background thread. 3. If only a width or height is passed in the other is automatically calculated, it might actually need to be designed to only support a height or width since the aspect ratio needs to be preserved. 4. The images aspect ratio is preserved. 5. The image is never written to the iOS devices disk.Resolving this issue, since the functionality Vishal suggested does work great
Closing ticket with reference to the above comment from Hans.