Vision: valid interlaced, 16-bit and low-bit grayscale PNGs are rejected
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- c
- Ambito
- computer-vision
Direzione di ricerca
Start by reading third_party/iris/png.h and the existing image-decoding coverage in tests/test_image_decode.c. Run the current tests, then review the listed PNG variants and the proposed fixture approach with the maintainers before choosing the supported scope. Done means the agreed valid PNG cases decode successfully with regression checks, or receive clearer client-facing errors if support remains out of scope.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
ds4_image_decode_memory() returns "invalid or unsupported PNG image" for several kinds of valid PNG, because third_party/iris/png.h accepts only non-interlaced 8-bit images (plus palette images at 1/2/4/8 bits):
- interlaced (Adam7) images:
png_load_mem()fails when the IHDR interlace byte is not 0 - 16-bit images of any color type (gray, gray+alpha, RGB, RGBA):
bit_depth != 8fails - grayscale at 1, 2 or 4 bits, which is common for scanned documents: the same check
The HF preprocessing these models are compared against loads images with PIL, which decodes all of these. Interlaced PNGs still show up on the web, and 16-bit PNGs come out of some screenshot and scientific tools. Today a client sending one gets an error, not a description of the image.
Repro, with no model: generate the images with Python's zlib and decode them with png_load() (the generator is 30 lines, happy to attach it):
rgb8.png decoded
rgb8_adam7.png REJECTED
rgb16.png REJECTED
gray1.png REJECTED
gray16.png REJECTED
rgba16.png REJECTED
The decoder fails closed, so this is not a safety problem. It is missing support, and the "unsupported" wording suggests the limit may be deliberate. Before writing anything: would you take a PR that adds Adam7 deinterlacing, 16-to-8-bit reduction and 1/2/4-bit grayscale expansion to png.h, with generated fixtures and checks in tests/test_image_decode.c like the JPEG ones? If you'd rather keep the decoder small, a clearer error ("interlaced PNG is not supported") would also help clients.
Written by Claude Code (AI assistant) on behalf of @namespaceMarcello, who directs this work.
- Lingua principale
- C
- Stelle
- 24.4k
- Fork
- 2.4k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di antirez/ds4
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
antirez/ds4#1189 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
antirez/ds4#1173 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
antirez/ds4#1032 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
awslabs/aws-c-common#1319 ·
-
editor/integration
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
DeusData/codebase-memory-mcp#3130 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 13 giorni
-
DBMS_UTILITY.FORMAT_ERROR_STACK exceeds the 2000-byte limitForse già presa @coder999o l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
zephyrproject-rtos/zephyr#127560 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni