Search the Community
Showing results for tags 'gd'.
-
I want to know how to open (php.ini file) to fix the problem , let me can install the GD Library. please help me, thank you everyone
- 1 reply
-
- gd library
- php
-
(and 2 more)
Tagged with:
-
we have a website running prestashop version: the following code is in a class called annonce.php $newwidth = 45; $newheight = round($height * $newwidth / $width); $tmp=imagecreatetruecolor($newwidth,$newheight); $white = imagecolorallocate($tmp, 255, 255, 255); imagefilledrectangle($tmp, 0, 0, $newwidth, $newheight, $white); $newwidth1 = 400; $newheight1 = round($height * $newwidth1 / $width); $tmp1=imagecreatetruecolor($newwidth1,$newheight1); $white = imagecolorallocate($tmp1, 255, 255, 255); imagefilledrectangle($tmp1, 0, 0, $newwidth1, $newheight1, $white); $newwidth2 = 430; $newheight2 = round($height * $newwidth2 / $width); $tmp2=imagecreatetruecolor($newwidth2,$newheight2); $white = imagecolorallocate($tmp2, 255, 255, 255); imagefilledrectangle($tmp2, 0, 0, $newwidth2, $newheight2, $white); $newwidth3 = 600; $newheight3 = round($height * $newwidth3 / $width); $tmp3=imagecreatetruecolor($newwidth3,$newheight3); $white = imagecolorallocate($tmp3, 255, 255, 255); imagefilledrectangle($tmp3, 0, 0, $newwidth3, $newheight3, $white); $newwidth4 = 183; $newheight4 = round($height * $newwidth4 / $width); $tmp4=imagecreatetruecolor($newwidth4,$newheight4); $white = imagecolorallocate($tmp4, 255, 255, 255); imagefilledrectangle($tmp4, 0, 0, $newwidth4, $newheight4, $white); imagecopyresampled($tmp, $src, (int)(($newwidth - $newwidth) / 2), (int)(($newheight - $newheight) / 2), 0, 0, $newwidth, $newheight, $width, $height); imagecopyresampled($tmp1, $src, (int)(($newwidth1 - $newwidth1) / 2), (int)(($newheight1 - $newheight1) / 2), 0, 0, $newwidth1, $newheight1, $width, $height); imagecopyresampled($tmp2, $src, (int)(($newwidth2 - $newwidth2) / 2), (int)(($newheight2 - $newheight2) / 2), 0, 0, $newwidth2, $newheight2, $width, $height); imagecopyresampled($tmp3, $src, (int)(($newwidth3 - $newwidth3) / 2), (int)(($newheight3 - $newheight3) / 2), 0, 0, $newwidth3, $newheight3, $width, $height); imagecopyresampled($tmp4, $src, (int)(($newwidth4 - $newwidth4) / 2), (int)(($newheight4 - $newheight4) / 2), 0, 0, $newwidth4, $newheight4, $width, $height); $filename = "img/p/".$id_product."-".$id_image."-small.jpg"; //45/45 $filename1 = "img/p/".$id_product."-".$id_image."-medium.jpg"; //400/300 $filename2 = "img/p/".$id_product."-".$id_image."-large.jpg"; //430/400 $filename3 = "img/p/".$id_product."-".$id_image."-thickbox.jpg"; //600/600 $filename3 = "img/p/".$id_product."-".$id_image.".jpg"; //600/600 $filename4 = "img/p/".$id_product."-".$id_image."-home.jpg"; //183/156 imagejpeg($tmp,$filename,100); imagejpeg($tmp1,$filename1,100); imagejpeg($tmp2,$filename2,100); imagejpeg($tmp3,$filename3,100); imagejpeg($tmp4,$filename4,100); imagedestroy($src); imagedestroy($tmp); imagedestroy($tmp1); imagedestroy($tmp2); imagedestroy($tmp3); imagedestroy($tmp4); It is used to resize an uploaded in different sizes to fit different views This function code is not working However when we upload an image from the backoffice, it is always correctly resized and placed in a white box and is not distorted. can anyone please help?
-
Bonjour, lorsque j'essaye d'upload mon CSV ça prend 30 secondes et j'obtiens cette erreur "Warning: imagejpeg(): gd-jpeg: JPEG library reports unrecoverable error: in /homepages/44/d274630444/htdocs/prestashop/classes/ImageManager.php on line 411" J'ai vérifié les espaces alloués au PHP ils sont OK, de même pour l'upload max. D'où peut venir le problème ? Merci pour vos réponses
-
Картинки товаров на белом фоне, фон однородный белый - rgb 255 255 255. Настройки - джипег сжатие 100. После ресайза, на картинках в каталоге товаров появляются шумы в виде полос с цветом rgb 254 254 254, короче фон становится не однородный белый, что портит внешний вид. Шум появляется только на картинках в каталоге товаров, в карточке товара и в других местах - все нормально. Во вложении картинка с увеличенной контрастностью чтобы лучше видны были эти полосы о которых я говорю. Есть ли лечение?
-
al tratar de instalar prestashop sale este error Verificamos en este momento la compatibilidad de PrestaShop con tu entorno del sistemaSi tienes alguna pregunta, por favor visítanos en documentación y foro de la comunidad . ¡Uups! Por favor corrija los siguientes puntos marcados como errores y después hacer Clic en el botón "Actualizar esta información" con el fin de probar de nuevo la compatibilidad de tu sistema.Parámetros PHP requeridos La librería GD no está instalada Parámetros PHP recomendados La extensión PDO MySQL no se ha cargado