jcesarmobile commented on issue #309: CB-13415 (android) Importing corrupt images using the Camera plugin c? URL: https://github.com/apache/cordova-plugin-camera/pull/309#issuecomment-361055486 I've finally tested and the problem is only present when `Camera.DestinationType.DATA_URL`, so I don't think the problem is the corrupted image itself, but the common out of memory problem when using DATA_URL. The sample image is 4MB, that shouldn't be a problem, but maybe being corrupted increase the memory needed to handle it. In the docs you can read: > NOTE: Photo resolution on newer devices is quite good. Photos selected from the device's gallery are not downscaled to a lower quality, even if a quality parameter is specified. To avoid common memory problems, set Camera.destinationType to FILE_URI rather than DATA_URL. So, I don't think you should hardcode the OutOfMemoryError to corrupted image as any big image not corrupted will also cause the OutOfMemoryError. So, @infil00p do you think we should hardcode it to something else? or just return the `e.getMessage()` or `e.getLocalizedMessage()`? The truth is the messages returned are not very helpful, is "failed to allocate xxxx byte allocation with yyyy free bytes and zzMB until OOM"
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
