Skip to content

info about CImgae constuctor #1

@matesp65

Description

@matesp65

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++;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions