unix-toolbox.js-exact-image icon indicating copy to clipboard operation
unix-toolbox.js-exact-image copied to clipboard

Out of memory on iOS 6

Open gamergemparq opened this issue 11 years ago • 3 comments
trafficstars

Hi Manuel,

Really loves your barcode scanner. But unfortunately I had issue with my iOS 6 device. Please advice.

Replication method:

  1. Load demo site [http://manuels.github.io/unix-toolbox.js-exact-image/demo/] in Safari iOS 6
  2. Took a picture.
  3. Saw this error: result: Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value, (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.: undefined

gamergemparq avatar Dec 28 '13 03:12 gamergemparq

You photo is probably too large. Can you resize it (e.g. using a canvas) and run it can?

manuels avatar Dec 29 '13 20:12 manuels

Hi Manuels,

Thanks for lending your time for this :D

I tried scaling down the image to 320x240px using CANVAS's scale() and then converts it to a blob using canvas.toBlob() method, but when passing the blob to the addData() function, nothing happens, visually.

So then I compared the print out of the binary data from my canvas attempt to the binary data of the unscaled/original uploaded file, and they look different. Not sure if CANVAS add extra stuff to the binary data, which makes it not working properly?

Your advise is appreciated.

gamergemparq avatar Dec 30 '13 16:12 gamergemparq

Hi and happy new year!

So then I compared the print out of the binary data from my canvas attempt to the binary data of the unscaled/original uploaded file, and they look different

do you still get the out of memory error with the scaled down version? can you post this output here?

manuels avatar Jan 01 '14 19:01 manuels