PHP 8.5.0 Alpha 4 available for testing

Voting

: eight minus eight?
(Example: nine)

The Note You're Voting On

quickshiftin at gmail dot com
10 years ago
Have a look at this thread on Stackoverflow for the answer regarding how to determine the max intensity of an image.

http://stackoverflow.com/questions/26239130/determine-max-possible-intensity-of-image/26240656#26240656

In short here is the code to make the $fuzz parameter behave more like you would expect (it now represents a percentage between 0-100). The $fuzz value should now be a float between 0 and 1.

class SaneImagick extends Imagick
{
public function paintTransparentImage($target, $alpha, $fuzz)
{
$iQuantumDepth = pow(2, $this->getQuantumDepth()['quantumDepthLong']);
return parent::paintTransparentImage($target, $alpha, $fuzz * $iQuantumDepth);
}
}

<< Back to user notes page

To Top