Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUACAMOLE VNC corrected translation values to RGB #412

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bimjaku
Copy link

@bimjaku bimjaku commented Feb 6, 2023

Corrected translation values to RGB

Old code produces encoded 8 bpp white color 0xFF

R: 7256 / 8 = 224
G: 7
256 / 8 = 224
B: 3*256 / 8 = 192

New code produces

R: 7255 / 7 = 255
G: 7
255 / 7 = 255
B: 3*255 / 3 = 255

Also for 15 bpp, 16 bpp ...

Corrected translation values to RGB

Old code produces encoded 8 bpp white color 0xFF

R: 7*256 / 8 = 224
G: 7*256 / 8 = 224
B: 3*256 / 8 = 192

New code produces

R: 7*255 / 7 = 255
G: 7*255 / 7 = 255
B: 3*255 / 3 = 255

Also for 15 bpp, 16 bpp ...
Same correction in cursor.c
Corrected translation values to RGB

Old code produces encoded 8 bpp white color 0xFF

R: 7*256 / 8 = 224
G: 7*256 / 8 = 224
B: 3*256 / 8 = 192

New code produces

R: 7*255 / 7 = 255
G: 7*255 / 7 = 255
B: 3*255 / 3 = 255

Also for 15 bpp, 16 bpp ...
Same correction in display.c
@bimjaku bimjaku changed the title Bimjaku patch 1 GUACAMOLE VNC corrected translation values to RGB Feb 6, 2023
Copy link
Contributor

@mike-jumper mike-jumper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @bimjaku! Please see our contribution guidelines:

https://github.com/apache/guacamole-server/blob/master/CONTRIBUTING

In particular:

  • All changes need a corresponding issue in JIRA, and that issue needs to be tagged in each relevant commit (see established commit history for examples of this). If you don't have an JIRA account, you can request one by sending an email to [email protected].
  • Commit messages need to describe the high-level nature of the changes being made (established git history is a good example of this, as well).

Commits like:

Commit messages

unfortunately do not add any information that isn't already automatically provided for readers of the history by git.

Here's a good blog post covering good vs. bad commit messages and why this is important:

https://www.codelord.net/2015/03/16/bad-commit-messages-hall-of-shame/

@bimjaku
Copy link
Author

bimjaku commented Feb 7, 2023

Thanks, I don't have a JIRA account, I created a git account just for this bug. For my needs, I have been fixing this error before compilation for a long time. I will not fight the windmill - I don't care if my correction is accepted or not.

It is 3 lines of code.

Original (wrong) code translates white color (8bpp) 0xFF -> E0E0C0, (16bpp) 0xFFFF -> F8FCF8

Fixed code translates white color (8bpp) 0xFF -> FFFFFF, (16bpp) 0xFFFF -> FFFFFF

@mike-jumper
Copy link
Contributor

... For my needs, I have been fixing this error before compilation for a long time. I will not fight the windmill - I don't care if my correction is accepted or not.

Part of contributing to the community involves working with that community for the benefit of others among you, including working with that community's processes. The guidelines noted above are in place for good reason - they ensure that all changes can be traced back to their origins, that any developer looking through the code history later can understand the context behind a change, and that the contents of each release can be easily determined and verified.

The volunteered time and effort of that community is the reason that this project exists, and it's great that you've taken steps to start adding your own time and effort to the equation. Don't be discouraged by feedback or the fact that there are unexpected steps for contributing code to a project that you enjoy. Take the time to understand the needs of the community receiving that code and collaborate with that community, just as that community has done for years to bring this code to you.

@necouchman
Copy link
Contributor

@mangeshtanpure123 : This has been covered by a different pull request and a different Jira issue. Please do not use random pull requests to post questions about unrelated issues. Either subscribe to the mailing list or search Jira for related issues.

https://guacamole.apache.org/support/
https://issues.apache.org/jira/projects/GUACAMOLE/issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants