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
When I want to compress a large resolution image, I want to cut the large resolution image into multiple sub-images of small resolution, such as 512*512, pillow_heif supports the compression of multiple sub-images, but the performance will be greatly reduced compared with the direct compression of large-resolution images. I noticed that multi-graph compression in the code seems to be serial for encode one by one,
The performance of multiple sub-images encode should be no lower than that of a single full-resolution graph directly encode
Actual Results
The performance of multi-subimage encode is more than 4 times lower than that of direct encode for a single full-resolution image
multi-subimage encode cost: 1.2968940734863281s
single full-resolution encode cost: 5.515080690383911s
Yes, because I don't know how to create a tiled image from a large resolution image, I did not find the parameter Settings related to tiled in the code, so I manually cut the large resolution image into several 512*512 small pictures, and then stack these small pictures together and use encode_image interface for encode.
In addition, In the latest 0.21.0 update log, libheif version was updated to 1.19.5, which is also the latest version of libheif. Is it because some features in libheif have not been integrated?
Describe the bug
When I want to compress a large resolution image, I want to cut the large resolution image into multiple sub-images of small resolution, such as 512*512, pillow_heif supports the compression of multiple sub-images, but the performance will be greatly reduced compared with the direct compression of large-resolution images. I noticed that multi-graph compression in the code seems to be serial for encode one by one,
pillow_heif/pillow_heif/heif.py
Line 604 in 55a3d39
Steps/Code to Reproduce
and here is my test image
1-input.zip
Expected Results
The performance of multiple sub-images encode should be no lower than that of a single full-resolution graph directly encode
Actual Results
The performance of multi-subimage encode is more than 4 times lower than that of direct encode for a single full-resolution image
multi-subimage encode cost: 1.2968940734863281s
single full-resolution encode cost: 5.515080690383911s
Versions
The text was updated successfully, but these errors were encountered: