AIR IOS app crashes on Base64 encoding image
In my app people can take a picture to send it to an API.
The image is loaded with a mediapromise and displayed in the view.
When the user submit his form I take following steps
- Resize the Bitmap to 800 width (tried lower reasonable sizes wothout success)
- encode it to a byteArray with the blooddy crypto jpegencoder with a quality of 70
- (I also tried to compress the bytearray)
- encoded the bytearray to a Base64 string (think I used all available base64 libs)
- send to the API.
This process runs smooth and fast enough on my HTC Desire but on any IOS device I test (iPhone,S3,iPhone 4) the app crashes or freezes the moment the Base64 encoder starts.
I guess this has something to do with a memory limit?
Does anyone know how I could prevent the crash?
Is it possible to Asynchronous Base64 encode an image?
Could it be a solution to create an ANE for the base64 encoding?