summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-09-10 15:25:08 +0200
committerGitHub <noreply@github.com>2020-09-10 15:25:08 +0200
commit4ae8caaf280b3a77ce8ff9a08c41015a6bb82a3e (patch)
treebabe1a729675b447115e35d42c04a1a5de415493 /lib
parent0aa442220b0ddffe8cd7e9bfb0603c65b61ab3d9 (diff)
parent46525f863967bba1cf304a4f2654817a0b742d46 (diff)
downloadnextcloud-server-4ae8caaf280b3a77ce8ff9a08c41015a6bb82a3e.tar.gz
nextcloud-server-4ae8caaf280b3a77ce8ff9a08c41015a6bb82a3e.zip
Merge pull request #22768 from nextcloud/fix/22288/change-0-to-null-for-bmp-encoding
Change 0 to null to properly encode image to BMP if the first pixel is black
Diffstat (limited to 'lib')
-rw-r--r--lib/private/legacy/OC_Image.php2
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);