Read color info from JPX stream

Fix colors problem #4540 + minor cleanup

fix lint warnings