Skip to content
Snippets Groups Projects

Resolve "16 bit PNG images are stored as big endian"

Merged Manuel Günther requested to merge 21-16-bit-png-images-are-stored-as-big-endian into master

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading