Read color info from JPX stream

Fix colors problem #4540 + minor cleanup

fix lint warnings
Use Stream instead of byte array access
Merge pull request #4565 from fkaelberer/fixJPXparsing

Read color info from JPX stream + fix color problem #4540