If you try to use the pngcheck example to list the chunk types in a PNG file then you get an output that is very noisy and difficult to read. For example, if you run the following command:
$ cargo run --example pngcheck -- -v tests/pngsuite/basi0g01.png
Notice how the type field contains a lot of information that is not useful in this context. I think this is a regression that was introduced inadvertently with pull request #248. The code is using the Debug implementation to print the escaped characters instead of the Display implementation. I think the intention was to print the escaped characters themselves and not a debug representation.
If the Display implementation is used instead to print the escaped characters then the chunk type becomes clear when running pngcheck:
If you try to use the pngcheck example to list the chunk types in a PNG file then you get an output that is very noisy and difficult to read. For example, if you run the following command:
Then you get the following noisy output:
Notice how the type field contains a lot of information that is not useful in this context. I think this is a regression that was introduced inadvertently with pull request #248. The code is using the
Debug
implementation to print the escaped characters instead of theDisplay
implementation. I think the intention was to print the escaped characters themselves and not a debug representation.If the
Display
implementation is used instead to print the escaped characters then the chunk type becomes clear when running pngcheck:Now the chunk types show as IHDR, gAMA, IDAT, and IEND.