Resolve "16 bit PNG images are stored as big endian"
Closes #21 (closed)
I have added functionality to read and write 16 bit PNG images correctly. 16 bit PNG images are stored as big-endian, but before we were writing them as little-endian. This PR fixes that.
This fix also includes a generic way of loading in one data type (e.g., uint_16) and automatically converting it into another data type (e.g., using uint8_t). Conversion is done such that pixel values are automatically scaled (in contrast to casting, which would cut off the MSB).
@andre.anjos I assign this PR to you since you have written the IO libraries.
Merge request reports
Activity
@mguenther can we have some new tests here please?
MR !20 (merged) needs to be applied before this one can fly.
Added 16 commits:
-
263dd6e1...9fffd374 - 12 commits from branch
master
- 288b4f97 - Added way of reading and writing 16-bit png images; still no tests
- 55b6a986 - Fixed implementation of 16 to 8 bit PNG (now I am converting, instead of casting…
- c6eb9234 - Added support for 16 bit gray png; added test cases
- 07a38949 - Merge branch '21-16-bit-png-images-are-stored-as-big-endian' of https://gitlab.i…
Toggle commit list-
263dd6e1...9fffd374 - 12 commits from branch
mentioned in commit 22598425
Please register or sign in to reply