Signed-off-by: Morris Jobke <hey@morrisjobke.de>
<InvalidReturnType occurrences="1">
<code>bool</code>
</InvalidReturnType>
- <InvalidScalarArgument occurrences="19">
- <code>$bits</code>
- <code>$lastIndex</code>
+ <InvalidScalarArgument occurrences="17">
<code>$this->bitDepth</code>
<code>90</code>
<code>$imagePath</code>
} elseif ($bit == 32) {
$bit = 24;
}
- $bits = pow(2, $bit);
+ $bits = (int)pow(2, $bit);
imagetruecolortopalette($im, true, $bits);
$width = imagesx($im);
$height = imagesy($im);
} // RLE8
elseif ($compression == 1 && $bit == 8) {
for ($j = $height - 1; $j >= 0; $j--) {
- $lastIndex = "\0";
+ $lastIndex = 0;
$sameNum = 0;
for ($i = 0; $i <= $width; $i++) {
$index = imagecolorat($im, $i, $j);