resample uploaded images instead of resize

(cherry picked from commit 7dcc41765313b1b097efa86d4a99fc8787b2c464)
This commit is contained in:
NekoCH
2023-05-23 15:56:28 +08:00
parent 8c3b05bf4d
commit b6a566bdd5
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST")
if(!$orig)
stderr($lang_bitbucketupload['std_image_processing_failed'],$lang_bitbucketupload['std_sorry_the_uploaded']."$imgtypes[$it]".$lang_bitbucketupload['std_failed_processing']);
$thumb = imagecreatetruecolor($newwidth, $newheight);
imagecopyresized($thumb, $orig, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
imagecopyresampled($thumb, $orig, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
switch ($it) {
case 1:
$ret = imagegif($thumb, $tgtfile);