You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe why it is important and where it will be useful
The latest version of the library cannot load certain valid images taken by the Samsun S24 Ultra camera when taken in the 200MP mode
Describe your proposed solution
Increase the security pixels and memory limits to compensate
Describe alternatives you've considered, if relevant
No response
Additional context
As I am using pi_heif with Pillow, I was able to by pass the pixels limit by declaring PIL.Image.MAX_IMAGE_PIXELS = None However, I am unable to bypass the memory security limit and the library keeps throwing this error whenever I try loading one of my S24 Ultra 200MP photos
Traceback (most recent call last):
File "E:\Git\TestingHeicConversion\lambda.py", line 41, in <module>
thumbnails = thumbnail_generator.generate_thumbnails(image)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Git\TestingHeicConversion\thumbnail_generator.py", line 136, in generate_thumbnails
resized = self.resize_image(image, dimensions)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Git\TestingHeicConversion\thumbnail_generator.py", line 67, in resize_image
return image.resize(new_size, Image.Resampling.LANCZOS)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Git\TestingHeicConversion\.venv\Lib\site-packages\PIL\Image.py", line 2336, in resize
self.load()
File "E:\Git\TestingHeicConversion\.venv\Lib\site-packages\pi_heif\as_plugin.py", line 61, in load
data = frame_heif.data # Size of Image can change during decoding
^^^^^^^^^^^^^^^
File "E:\Git\TestingHeicConversion\.venv\Lib\site-packages\pi_heif\heif.py", line 63, in data
self.load()
File "E:\Git\TestingHeicConversion\.venv\Lib\site-packages\pi_heif\heif.py", line 114, in load
self._data = self._c_image.data
^^^^^^^^^^^^^^^^^^
RuntimeError: Memory allocation error: Security limit exceeded: Allocating 599270415 exceeds the security limit of 536870912 bytes
Describe why it is important and where it will be useful
The latest version of the library cannot load certain valid images taken by the Samsun S24 Ultra camera when taken in the 200MP mode
Describe your proposed solution
Increase the security pixels and memory limits to compensate
Describe alternatives you've considered, if relevant
No response
Additional context
As I am using pi_heif with Pillow, I was able to by pass the pixels limit by declaring
PIL.Image.MAX_IMAGE_PIXELS = None
However, I am unable to bypass the memory security limit and the library keeps throwing this error whenever I try loading one of my S24 Ultra 200MP photosHere is a sample photo for reference: https://drive.google.com/file/d/1O25UO4vms1I4kbauexx0gJ8gtCgWkHFk/view?usp=sharing
The text was updated successfully, but these errors were encountered: