diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-09-10 12:07:56 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-09-10 12:08:01 +0200 |
commit | 46525f863967bba1cf304a4f2654817a0b742d46 (patch) | |
tree | dadcc1076c974a75e74ab2c19025eb73d0f784a8 /lib/private | |
parent | cd563023dbceede717b22ce559f3efdf92b1da31 (diff) | |
download | nextcloud-server-46525f863967bba1cf304a4f2654817a0b742d46.tar.gz nextcloud-server-46525f863967bba1cf304a4f2654817a0b742d46.zip |
Change 0 to null to properly encode image to BMP if the first pixel is black
Ref #22288
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/legacy/OC_Image.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/legacy/OC_Image.php b/lib/private/legacy/OC_Image.php index 1e2791f62c9..3e9812c99f2 100644 --- a/lib/private/legacy/OC_Image.php +++ b/lib/private/legacy/OC_Image.php @@ -1211,7 +1211,7 @@ if (!function_exists('imagebmp')) { } // RLE8 elseif ($compression == 1 && $bit == 8) { for ($j = $height - 1; $j >= 0; $j--) { - $lastIndex = 0; + $lastIndex = null; $sameNum = 0; for ($i = 0; $i <= $width; $i++) { $index = imagecolorat($im, $i, $j); |