Skip to content
New issue

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

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

Already on GitHub? # to your account

info about CImgae constuctor #1

Open
matesp65 opened this issue Oct 24, 2019 · 0 comments
Open

info about CImgae constuctor #1

matesp65 opened this issue Oct 24, 2019 · 0 comments

Comments

@matesp65
Copy link

Hi
could you please explain why do you have used that bold number in the formula below?
why we need to use them?
tks

int j = 0;
for (int i = 0; i < bufferSize; i += numComponents) {
float y0 = ### ((tempData[i + 2] & 0xFF) * 25
+ (tempData[i + 1] & 0xFF) * 129 + (tempData[i] & 0xFF) * 66);

int y = Math.round(y0 / 256.0f) + 16;
if (y > 255)
y = 255;
if (y > maxPixel) {
maxPixel = y;
}
this.data[j] = (byte) y;
j++;

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

No branches or pull requests

1 participant