Skip to content

Conversation

@mreiden
Copy link
Owner

@mreiden mreiden commented Oct 7, 2018

An image that fits in a single histogram bucket (single color image) causes VBox->volume to be negative due to not setting rgbMax in addition to rgbMax. This leave rgbMax at 0 causing VBox to compute a negative and incorrect volume as $this->volume = (($this->r2 - $this->r1 + 1) * ($this->g2 - $this->g1 + 1) * ($this->b2 - $this->b1 + 1));.

An image that fits in a single histogram bucket (single color image) causes VBox->volume to be negative due to not setting rgbMax in addition to rgbMax.  This leave rgbMax at 0 causing VBox to compute a negative and incorrect volume.
PHP_INT_MIN was introduced in PHP7.
A one color image should result is a VBox where Rmin=Rmax, Gmin=Gmax, Bmin=Bmax, and volume=1 (1*1*1).
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