Allow to get the raw image data without going over PIL.Image or NumPy
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/100
Hướng nghiên cứu
Bắt đầu trong sane.py với triển khai dev.snap() hiện có và các phương thức quét khác gọi start(). Cung cấp dữ liệu snapshot thô mà không yêu cầu PIL hoặc NumPy, đồng thời thêm raw_scan với cùng hành vi gọi start() trước khi chụp. Hoàn tất nghĩa là các bên gọi có thể lấy được các byte quét thô thông qua API công khai mà không cần một trong hai dependency tùy chọn.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
So far there are two officially documented ways of getting image data after scanning: PIL.Image or NumPy array.
They both have their downsides. To only name one per package, PIL.Image lacks 48bit color support which limits all scans to only 24bit and a NumPy array is no image format. To get the data into something with proper image handling support (like a GdkPixbuf) this would have to be converted back to raw bytes, which makes the intermediate NumPy array useless.
Especially as both, PIL and NumPy, are optional dependencies, which are not enforced to use Python SANE, it would be nice to have some basic way to do a scan if neither PIL or NumPy are installed.
I'm currently developing a GUI scanning application in Python using the module, developed here. To do my scanning, I'll use "dev.snap()" which somewhat feels like an "undocumented internal function" but it does exactly what I need.
What I'm asking for is if it would be an useful addition to this module to expose "dev.snap()" in "sane.py" as "raw_snap" and add a convenience method "raw_scan" which, like the other "scan" methods, will call "start()" before calling "raw_snap". If so, I could prepare a Pull Request for this. I will keep using "dev.snap()" in the mean time as there is no useful alternative for now.
- Ngôn ngữ chính
- C
- Star
- 61
- Fork
- 22
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
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 python-pillow/Sane
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 50/100
python-pillow/Sane#107 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
python-pillow/Sane#103 ·
-
Sane leaks filedescriptors Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
python-pillow/Sane#93 ·
-
Cannot push virtual buttons Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
python-pillow/Sane#92 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
python-pillow/Sane#81 · 1 bình luận ·
Tất cả issue của python-pillow/Sane
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
level/task module/gcp type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
Build failure with newer clang Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
hapostgres/pg_auto_failover#1190 ·
-
docs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
P3 sonic-vpp
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
sonic-net/sonic-buildimage#29662 ·