gen2brain / heic

HEIC image decoder
MIT License
11 stars 2 forks source link

Having memory issue when decoding particular heif image files #7

Open Rae93 opened 2 weeks ago

Rae93 commented 2 weeks ago

Hello ! Thank you for your awesome libs, I have some trouble finding out the cause when trying to decode some image files. in my K8s, the memory limit is 256MB which I think is quite plenty already, I attached 2 files in the zip.

Could you help me investigate what exactly happened when decoding these 2 files ? I really appreciate your help ! error.zip

Rae93 commented 2 weeks ago

@gen2brain

gen2brain commented 2 weeks ago

I have no issue with decoding the files. You are low on memory. For just one of your 3024x4032 images, RGBA needs 50M for WASM decode then it will allocate image.RGBA that probably needs a little more than that, and copy the data, then there is runtime and you probably have an HTTP server, etc.