How to open 200MP HEIC images in Arch Linux

Looks like in most Linux distributions due to the memory limit of 512MB in libheif source code, we cannot open photos which needs higher than 512MB of memory to decode.

The fix
Install the package AUR (en) - libheif-highmem
yay -S libheif-highmem

Please feel free to manually install or install using any aur helpers

Enjoy!

1 Like

from PIL import Image
import numpy

img= Image.open(“image.file”)
np_img = numpy.array(img)

1 Like

Did it work?. Tried a 200MP file?

Thanks for sharing this! I was running into issues with large HEIF images, and this fix is exactly what I needed. Installing libheif-highmem worked like a charm. Really appreciate the info!

Cheers! :blush:

1 Like

Ideally should work, didn’t try

1 Like