Skip to content

Conversation

@Arashfa0301
Copy link
Contributor

Description

The application was failing when processing HEIC images with a ffi.error: struct heif_decoding_options: wrong total size error due to compatibility issues between pyheif and the underlying C library. This PR replaces pyheif with pillow-heif, a more modern and actively maintained library that integrates directly with PIL/Pillow. The changes include updating the dependency in pyproject.toml, simplifying the HEIC conversion logic from complex manual data handling to a simple Image.open() call, and cleaning up imports and code formatting. This eliminates the C library compatibility issues while making the code more maintainable and reliable for HEIC image processing.

Testing

  • I have thoroughly tested my changes.

Resolves ABA-1487

@linear
Copy link

linear bot commented Sep 6, 2025

Copy link

@itsisak itsisak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Havent tested it myself but looks good

@webkom webkom deleted a comment from itsisak Sep 6, 2025
@Arashfa0301 Arashfa0301 merged commit da01da9 into master Sep 8, 2025
5 checks passed
@Arashfa0301 Arashfa0301 deleted the fix-heic-support branch September 8, 2025 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants