scijs/get-pixels

error: maxMemoryUsageInMB limit exceeded when decoding large jpegs

bennlich opened this issue · 0 comments

getPixels() fails on large jpeg inputs with error: maxMemoryUsageInMB limit exceeded.

This error seems to come from jpeg-js, which accepts an options object for overriding the default memory limit: https://github.com/jpeg-js/jpeg-js#decode-options.

One solution would be to remove this limit altogether by always passing in an enormous value for maxMemoryUsageInMB when calling jpeg-js.