Add Native HEIC Support and Fix EXIF Orientation#17
Merged
kocabiyik merged 3 commits intoApr 13, 2026
Conversation
kocabiyik
approved these changes
Apr 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds native support for HEIC/HEIF image formats (commonly used by iOS devices) and addresses an issue where mobile uploads appear incorrectly rotated in the processed output.
Key Changes:
pillow-heifto enable decoding of Apple-native image formats in the FastAPI backend.ImageOps.exif_transposeto ensure images respect their original EXIF orientation metadata before processing.RGBAconversion to ensure consistency across all inference models.remove_background_endpointdocstrings to follow the project's Google-style standard.Type of Change
feat- New feature (MINOR version bump)fix- Bug fix (PATCH version bump)docs- Documentation onlystyle- Code style/formattingChecklist
main.py).black+ruff).Related Issues
Closes #7
Testing
Verified locally using
uvon Arch Linux (Python 3.12):.heicfiles via Swagger UI and confirmed successful processing..pngand.jpgprocessing remains unaffected.Screenshots
Successful HEIC Processing (Swagger UI):
📝 Note: When this PR is merged to
main, an automated release will be triggered based on your commit messages.