{"action":"created","issue":{"url":"https://api.github.com/repos/Anyline/anyline-ocr-react-native-module/issues/6","repository_url":"https://api.github.com/repos/Anyline/anyline-ocr-react-native-module","labels_url":"https://api.github.com/repos/Anyline/anyline-ocr-react-native-module/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/Anyline/anyline-ocr-react-native-module/issues/6/comments","events_url":"https://api.github.com/repos/Anyline/anyline-ocr-react-native-module/issues/6/events","html_url":"https://github.com/Anyline/anyline-ocr-react-native-module/issues/6","id":201767151,"number":6,"title":"respect captureResolution and/or ...","user":{"login":"mvayngrib","id":83948,"avatar_url":"https://avatars.githubusercontent.com/u/83948?v=3","gravatar_id":"","url":"https://api.github.com/users/mvayngrib","html_url":"https://github.com/mvayngrib","followers_url":"https://api.github.com/users/mvayngrib/followers","following_url":"https://api.github.com/users/mvayngrib/following{/other_user}","gists_url":"https://api.github.com/users/mvayngrib/gists{/gist_id}","starred_url":"https://api.github.com/users/mvayngrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvayngrib/subscriptions","organizations_url":"https://api.github.com/users/mvayngrib/orgs","repos_url":"https://api.github.com/users/mvayngrib/repos","events_url":"https://api.github.com/users/mvayngrib/events{/privacy}","received_events_url":"https://api.github.com/users/mvayngrib/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-19T05:19:42Z","updated_at":"2017-01-20T13:56:39Z","closed_at":null,"body":"I don't think captureResolution is being respected at the moment, at least on iOS.\r\n\r\nThe react-native bridge is really inefficient at transferring images > 100KB. I see a couple of ways this could be handled (these are not mutually exclusive):\r\n1. respect capture resolution\r\n2. add a `quality` option, like [react-native-image-picker](https://github.com/marcshilling/react-native-image-picker) does, and scale the image accordingly. An excerpt from image picker's code:\r\n```obj-c\r\nif ([[[self.options objectForKey:@\"imageFileType\"] stringValue] isEqualToString:@\"png\"]) {\r\n    data = UIImagePNGRepresentation(image);\r\n}\r\nelse {\r\n    data = UIImageJPEGRepresentation(image, [[self.options valueForKey:@\"quality\"] floatValue]);\r\n}\r\n```\r\n3. Return only the imagePath + fullImagePath and leave the extraction of the image from the disk to the developer. This would allow the result to be returned asap. This is definitely a good option to have."},"comment":{"url":"https://api.github.com/repos/Anyline/anyline-ocr-react-native-module/issues/comments/274077539","html_url":"https://github.com/Anyline/anyline-ocr-react-native-module/issues/6#issuecomment-274077539","issue_url":"https://api.github.com/repos/Anyline/anyline-ocr-react-native-module/issues/6","id":274077539,"user":{"login":"danielalbertini","id":1771071,"avatar_url":"https://avatars.githubusercontent.com/u/1771071?v=3","gravatar_id":"","url":"https://api.github.com/users/danielalbertini","html_url":"https://github.com/danielalbertini","followers_url":"https://api.github.com/users/danielalbertini/followers","following_url":"https://api.github.com/users/danielalbertini/following{/other_user}","gists_url":"https://api.github.com/users/danielalbertini/gists{/gist_id}","starred_url":"https://api.github.com/users/danielalbertini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielalbertini/subscriptions","organizations_url":"https://api.github.com/users/danielalbertini/orgs","repos_url":"https://api.github.com/users/danielalbertini/repos","events_url":"https://api.github.com/users/danielalbertini/events{/privacy}","received_events_url":"https://api.github.com/users/danielalbertini/received_events","type":"User","site_admin":false},"created_at":"2017-01-20T13:56:39Z","updated_at":"2017-01-20T13:56:39Z","body":"Thx we missed that one in the iOS documentation. Yes for certain modules there are some paramters fixed.\r\n\r\nFor Energy:\r\n- Capture Resolution is fixed to 1080\r\n- Cutout Width & Cutout Height\r\n- Cutout Alignment should be set to TOP with a little offset, as this reduces reflections\r\n\r\nWe have option 3 in our Cordova Wrappers. I don't know why we are doing both right now in ReactNative (returning a path & returning a base64 string). Maybe a requirement by another customer. \r\n\r\n@JonasLaux will be able to clarify that when he is back next week."}}
{"actor":{"display_login":"danielalbertini"}}