HerrZatacke / 2bit-pxlr-studio

A custom ROM for the Game Boy Camera
MIT License
94 stars 5 forks source link

Issue with the calculation of pixels in Histogram #53

Open Raphael-Boichot opened 2 years ago

Raphael-Boichot commented 2 years ago

Two issues in 1:

So the way the white pixels are counted is sometimes not accurate and the calculation should be restricted to a 128x112 image.

Raphael-Boichot commented 2 years ago

I however do not see any obvious issue in void createHistogram() apart that I do not found what bitsSetLUT does (I think a sum of the bits into the byte ?).

Raphael-Boichot commented 2 years ago

Oh, got it, Histogram is declared as uint8_t, there may be an overflow somewhere and it should be uin16_t for sum of pixel values. I wonder how it could work sometimes.