[image_en-decoding] Encoder rejects standard BMPs; accept BITMAPINFOHEADER (40-byte DIB)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 75/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- cpp
- Ambito
- computer-graphics
Direzione di ricerca
Start in Encoder_Decoder/image_en-decoding/src/encoder.cpp, especially readBMP() around lines 38–49, and trace how it reads the BMP header and pixel data. Check the existing encoder and decoder workflow, then add tests for 24-bit uncompressed BMPs with 40-byte headers in both bottom-up and top-down layouts. Done means Pillow- and ImageMagick-written BMPs encode successfully, and compressed or paletted BMPs receive a clear rejection message.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
readBMP() only accepts OS/2 1.x BMPs (pixel-data offset 0x1A, 12-byte BITMAPCOREHEADER) - the format the decoder writes. Practically every BMP produced by Pillow, GIMP, Paint or ImageMagick uses the 40-byte BITMAPINFOHEADER (offset 54) and is rejected, contradicting the README's "IMage encodes uncompressed BMPs".
Location
Encoder_Decoder/image_en-decoding/src/encoder.cpp:38-49
Evidence
$ python -c "from PIL import Image; Image.new('RGB',(93,67)).save('grad.bmp')"
$ bin/encoder grad.bmp
Reading grad.bmp...
Error - Invalid offset
$ bin/encoder rt.bmp # BMP written by bin/decoder
-> rt.jpg, Pillow decodes it; PSNR vs input 44.8 dB
Expected
24-bit uncompressed BMPs with BITMAPINFOHEADER (bottom-up and top-down) are accepted.
Proposed fix
Read the pixel-data offset and DIB size from the header; support DIB sizes 12, 40, 108, 124; handle signed (negative) heights for top-down images; reject compressed/paletted BMPs with a clear message.
Acceptance criteria
- Pillow- and ImageMagick-written 24-bit BMPs encode successfully
- Unit test for both bottom-up and top-down BMPs
Repository audit, November 2026 · Phase 9 · New features · evidence: reproduced · ref algorithms-security-048
Generated by Claude Code
- Lingua principale
- C++
- Stelle
- 2
- Fork
- 1
- 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 ibra-kdbra/Math-Problems
-
area: security-algorithms priority: P1 size: XS type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
ibra-kdbra/Math-Problems#417 ·
-
area: math-chaos priority: P3 size: S type: enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ibra-kdbra/Math-Problems#397 ·
-
area: docs-site good first issue priority: P3 size: XS type: chore
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
ibra-kdbra/Math-Problems#379 ·
-
area: docs-site good first issue priority: P3 size: XS type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
ibra-kdbra/Math-Problems#378 ·
-
area: docs-site good first issue priority: P2 size: XS type: chore
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
ibra-kdbra/Math-Problems#367 ·
Tutte le issue di ibra-kdbra/Math-Problems
Issue simili
-
TransformInteract: a circle drag through the centre sets Scale to its minimum, which can't grow backApertadifficulty:easy prio:low type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
NatronGitHub/openfx-supportext#311 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
CachyOS/packageinstaller#211 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
OpenEmu-Silicon/OpenEmu-Silicon#920 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100