Skip to content

Commit 903ed80

Browse files
committed
Fix image writing
1 parent 6f933ec commit 903ed80

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/TgUtils/ImageUtils.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,26 +129,26 @@ public static function writeImage($image, $path) {
129129
$ext = strtolower(pathinfo($path, PATHINFO_EXTENSION));
130130
switch ($ext) {
131131
case 'png':
132-
if (!imagepng($thumbnail, $path)) $path = NULL;
132+
if (!imagepng($image, $path)) $path = NULL;
133133
break;
134134
case 'jpg':
135135
case 'jpeg':
136-
if (!imagejpeg($thumbnail, $path)) $path = NULL;
136+
if (!imagejpeg($image, $path)) $path = NULL;
137137
break;
138138
case 'webp':
139-
if (!imagewebp($thumbnail, $path)) $path = NULL;
139+
if (!imagewebp($image, $path)) $path = NULL;
140140
break;
141141
case 'xpm':
142-
if (!imagexbm($thumbnail, $path)) $path = NULL;
142+
if (!imagexbm($image, $path)) $path = NULL;
143143
break;
144144
case 'wbmp':
145-
if (!imagewbmp($thumbnail, $path)) $path = NULL;
145+
if (!imagewbmp($image, $path)) $path = NULL;
146146
break;
147147
case 'gif':
148-
if (!imagegif($thumbnail, $path)) $path = NULL;
148+
if (!imagegif($image, $path)) $path = NULL;
149149
break;
150150
case 'bmp':
151-
if (!imagebmp($thumbnail, $path)) $path = NULL;
151+
if (!imagebmp($image, $path)) $path = NULL;
152152
break;
153153
default:
154154
$path = NULL;

0 commit comments

Comments
 (0)