Skip to content

feat: support JPEG/HEIC documents as images, limit edit resolution, and improve Python 3.13+ compatibility#3

Open
mbv06 wants to merge 7 commits into
ZorgeR:mainfrom
mbv06:feature/jpeg-document-images
Open

feat: support JPEG/HEIC documents as images, limit edit resolution, and improve Python 3.13+ compatibility#3
mbv06 wants to merge 7 commits into
ZorgeR:mainfrom
mbv06:feature/jpeg-document-images

Conversation

@mbv06

@mbv06 mbv06 commented Jun 11, 2026

Copy link
Copy Markdown

Description

This PR introduces support for processing various image formats (JPEG, JPG, HEIC, HEIF) sent as uncompressed documents in Telegram. It also includes improvements to image processing limits, code refactoring, and dependency updates for better compatibility.

Key Changes

🚀 Features & Enhancements

  • Extended Image Format Support:
    • Added support for .jpg and .jpeg files sent as uncompressed documents, correctly routing them to the photo analysis pipeline.
    • Introduced full support for Apple's HEIC and HEIF image formats. Added necessary conversion utilities (app/image_utils.py) to handle these formats gracefully.
  • Media Group Handling: Added support for processing grouped image documents (media groups) for all newly supported formats, utilizing the existing photo queuing logic.
  • Image Processing Refactoring: Extracted the core image processing logic from handle_photo_message into a new, reusable process_image_message function, avoiding code duplication and making it accessible for document handlers.
  • Resolution Limits: Implemented an input resolution limit for image edits (app/agents/image_tools.py) to prevent the processing of excessively large files.

🔧 Maintenance & Compatibility

  • Dependencies Updated:
    • Added dependencies required for HEIC/HEIF processing to requirements.txt.
    • Added audioop-lts to fix compatibility issues with Python 3.13 (where the standard audioop module was removed).
  • Gitignore Updates: Added temporary media directories to .gitignore to prevent accidental commits of local testing files.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f9adc65276

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/main_bot.py Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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.

1 participant