{ "id": "63998", "key": "TIMOB-3366", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2017-06-07T22:50:38.000+0000", "created": "2011-04-15T03:43:20.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "blob", "dimensions", "file", "image", "ios", "iphone", "media", "size" ], "versions": [], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-06-07T22:50:38.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "While building an app which uses the camera or picker to choose or take photos, I've come across a bizarre bug.\r\n\r\nAfter choosing a photo from the album, I needed to know the file size. Also I needed to know the width and height. So, using:\r\n\r\n{code}\r\nTi.API.info(\"photo size : width:\"+event.media.width+' height:'+event.media.height);\r\n{code}\r\n\r\nI can see the dimensions fine.\r\n\r\nBut when I tried to use event.media.size it returned the width*height !!?? (See line 74 in TiBlob.m !) Most bizarre.\r\n\r\nWhen I then decide to write this file to the application data directory (as my app needs), this works fine as the blob's .size property does then respond with the correct filesize in bytes.\r\n\r\nIs this being caused by some confusion form using the word 'size' for a filesize in one case (a blob) and then by using the word 'size' for a dictionary containing width and height for an image.\r\n\r\nEither way, responding with width*height for an image 'size' seems like a nasty (but easily solved) error/bug.", "attachment": [], "flagged": false, "summary": "iOS: event.media.size reporting incorrect file size after camera/picker", "creator": { "name": "kosso", "key": "kosso", "displayName": "kosso", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "kosso", "key": "kosso", "displayName": "kosso", "active": true, "timeZone": "Europe/London" }, "environment": null, "comment": { "comments": [ { "id": "421316", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket due to time passed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-06-07T22:50:38.000+0000", "updated": "2017-06-07T22:50:38.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }