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

Main #97

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

Main #97

wants to merge 3 commits into from

Conversation

BlueboyZX
Copy link
Contributor

Implements makeWeightedGreyscaleCopy in ImageUtil. This is needed for Pyro kiosks that require a greyscale image based only on the red channel. This implementation lets similar tasks be performed using any combination of three channels to meet any future kiosk needs.

    double coefficientRed,
    double coefficientGreen,
    double coefficientBlue)

    (coeffRed * red) + (coeffBlue * blue) + (coeffGreen * Green)
    There is no /3 in this method
    Values are clipped, so if the total is above 255, only 255 is written

    1, 0, 0 would generate a greyscale on the unchanged red channel
    0, 0, 2 would generate a greyscale on a doubled blue channel

    Negative and decimal coefficients are supported
    0.8, 0.1, -0.2 as a random example would be valid if the situation calls for it
  int threshold)

As an example, the red kiosks in Pyro do well with
  a threshold of 155
  It dilates the font of an image in two steps
  This seems to work best for kiosks that need dilation
  for portions of their text.
@EtienneLamoureux
Copy link
Owner

Will help with #96

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.

2 participants