Update file compte.php
This commit is contained in:
parent
30a5b887f4
commit
33596f3823
@ -59,6 +59,8 @@ if (isset($_FILES['profile_picture']) && $_FILES['profile_picture']['error'] ==
|
||||
$imageResized = imagecreatetruecolor($newWidth, $newHeight);
|
||||
$imageOriginal = imagecreatefromstring(file_get_contents($tempPath));
|
||||
imagecopyresampled($imageResized, $imageOriginal, 0, 0, 0, 0, $newWidth, $newHeight, $width, $height);
|
||||
imagealphablending($imageResized, false);
|
||||
imagesavealpha($imageResized, true);
|
||||
|
||||
// Enregistrement de l'image redimensionnée
|
||||
imagepng($imageResized, $rootPath);
|
||||
@ -90,6 +92,8 @@ if (isset($_FILES['banner']) && $_FILES['banner']['error'] == 0) {
|
||||
$newWidth = 600;
|
||||
$newHeight = ($height / $width) * $newWidth;
|
||||
$imageResized = imagecreatetruecolor($newWidth, $newHeight);
|
||||
imagealphablending($imageResized, false);
|
||||
imagesavealpha($imageResized, true);
|
||||
$imageOriginal = imagecreatefromstring(file_get_contents($tempPath));
|
||||
imagecopyresampled($imageResized, $imageOriginal, 0, 0, 0, 0, $newWidth, $newHeight, $width, $height);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user