Tests: add real sample images (incl. HEIC) and cover HEIC in resize, convert and chains
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 42/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- python
- Lĩnh vực
- testing-qa
Hướng nghiên cứu
Start with tests/fixtures.py and the HEIC coverage in tests/test_info_cli.py and tests/test_info_helpers.py, then read the resize, convert, and chain tests. Add small real samples under tests/data/ and document their sources and upright dimensions in tests/data/README.md. Done means tests cover HEIC resize, conversion, the conversion-plus-resize chain, and rotated HEIC behavior, including GPS stripping where specified.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
The suite builds every test image on the fly with Pillow (tests/fixtures.py). That works well for isolated behavior, but two gaps showed up while preparing real photos with 1.7.0:
- HEIC is only tested through
info.sample_heic_imageandsample_jpeg_named_heicare used intests/test_info_cli.pyandtests/test_info_helpers.pyonly. Nothing coversresizeon a HEIC,convertfrom HEIC, or a chain likeconvert --format jpg + resize. That chain works in practice (verified by hand on 2026-11-17), but no test would catch a regression. - The synthetic HEIC has no orientation.
create_heic_filesaves a plain solid-color image. Real iPhone HEICs can carry rotation, and HEIF can express it in its own container transforms (irot/imir) as well as in EXIF. I have not verified how ipro and pillow-heif handle each case. The point is that no test exercises it. The orientation bug in #24 was invisible to programmatic checks until a real portrait photo hit it.
Proposal
Keep the generated fixtures, and add a small set of real sample files:
tests/data/with 4-5 tiny files (a few KB each), for example:- portrait HEIC from an iPhone
- landscape HEIC
- JPG with EXIF Orientation=6 (iPhone portrait)
- MPO from a recent iPhone (
.JPGextension, multiple frames)
- Shrink them (e.g. 200px) and strip GPS before committing. Use our own photos so licensing is clean.
- Document each file's source device and expected upright dimensions in
tests/data/README.md.
New tests:
resizeHEIC: output is upright at the expected dimensions.convertHEIC to JPG: upright, GPS stripped.- Chain
convert --format jpg + resize --width N: both stages produce correct output. - Rotated real HEIC through
resizeandconvert --strip-exif: stays upright.
Context
Follow-up to #24 and to a 24-photo batch on 2026-11-17 (4 HEIC, 8 rotated JPG). Related: #28, #29, #31.
— Emily
- Ngôn ngữ chính
- Python
- Star
- 1
- Fork
- 0
- Merge trung bình
- 4 giờ 13 phút
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của cadentdev/ipro
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 50/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
Tất cả issue của cadentdev/ipro
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
LearningCircuit/local-deep-research#10161 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
chore: contact address [email protected]Có thể đã có người làm @larsrollik đã nhận hôm nay. Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 82/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Gustavo-Galvao-e-Silva/panchi#228 ·
Maintainer thường phản hồi trong vòng 1 ngày