AldaronLau / AldaronLau/png_pong

Support gAMA, cHRM chunks

Aperta
#4 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement good first issue
Lingua principale
Rust
Stelle
29
Fork
4
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

**Is your feature request related to a problem? Please describe.**

Attempting to read an image with a `gAMA` and `cHRM` chunks ([which are in the PNG1.2 spec](http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html#C.gAMA)) results in `UnknownChunkType` error.

**Describe the solution you'd like**

I'd like to be able to losslessly stream a PNG from a `Decoder` to `Encoder`, to do so it would be ideal to propagate all chunks from the source to the destination. Perhaps there could be an extra variant `Unknown` added to `Chunk` that carries the chunk type and data, so that it can be passed through to the encoder as-is.

**Describe alternatives you've considered**

I can ignore the error for now and skip this chunk.

**Additional context**

The image in question:

Screenshot_2021-02-12 Screenshot-192

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.