Browse Source

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
pull/22782/head
Morris Jobke 5 years ago
committed by GitHub
parent
commit
4ae8caaf28
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      lib/private/legacy/OC_Image.php

2
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);

Loading…
Cancel
Save