Most voted "gd" questions
GD is an open source library for dynamic image creation by programmers. GD is written in C, and "Wrappers" are available for Perl, PHP and other languages. GD creates PNG, JPEG, GIF, Webp, XPM, BMP images, among other formats. If the question is not about "GD", do not use this tag, even if you are using "GD" in your project.
Learn more…20 questions
Sort by count of
-
8
votes1
answer1017
viewsMemory usage PHP images
I have an image upload and to treat the images I’ve used (Imageworkshop and Imagine), however the problem is not the libraries, it is the absurd amount of memory that is used in some situations.…
-
5
votes2
answers2377
viewsWrite image with php
I am trying to print online certificates dynamically filled with PHP. The code I’m using is: class Certificado { public $nome_para_certificado = ''; public $modelo_de_certificado = ''; function…
-
2
votes3
answers2091
viewsPlace an image in the center of another image in PHP
I have an image . png of for example 200x200px. I need her to stay with 300x300px, but without enlarging the image, just by putting it inside and centering on a 300x300px white square. Is that…
-
2
votes1
answer100
viewsHow do I save an image in a path by searching from an Oracle base?
I’m trying with the PHP GD library, like this: <?php $con = oci_connect('root', '123', '172.16.1.100/DB'); $stmt = oci_parse($con, "SELECT Nome, Imagem FROM Tabela where ID = '1'");…
-
2
votes1
answer457
views -
1
votes2
answers682
viewsProblem with resizing PNG images in PHP
Good night. I’m with a virtual store script here, but I’m having problems with PNG images. When uploading an image like this: . The script checks the extension based on mimetype, "sanitize" the file…
-
1
votes1
answer362
viewsResize image in a square while keeping the original PHP image aspect ratio
What happens is this: I’m pulling some product photos from an XML link, and the images come in different sizes. Currently I use a code that takes the image and resizes to 200x200, but images with…
-
1
votes1
answer38
viewsAdapt transparency code in this PHP code
Hello, I want to put this code below in my current image resizing via link (<img src='resize.php?w=100&h=100&img=img.jpg'>). $newImg = imagecreatetruecolor($nWidth, $nHeight); /*…
-
1
votes1
answer665
viewsProblem when creating an image with transparent background
Hello, I’m trying to create a PHP image like the emails of offers sent automatically by Casasbahia. Example of the Casasbahia; I searched the Internet and found the following code that helped me a…
-
1
votes1
answer139
viewsWorking with Images - PHP
I have worked and still work with some image manipulation libraries in PHP, but I decided to study at source the manipulations, how they work, how to implement and work with images. As we know the…
-
0
votes2
answers271
viewsImage appears "broken" after you changed the PHP version
currently changed a machine application, so the barcode image no longer appears. The PHP version of this new machine is newer, I tried to change the image call but nothing happens. How could I fix?…
-
0
votes1
answer35
viewsGD/PHP Add text from form / Transparent Background
<?php $image = imagecreatetruecolor(100, 100); //Fundo Transparente imagealphablending($image, false); $transparency = imagecolorallocatealpha($image, 0, 0, 0, 127); imagefill($image, 0, 0,…
-
0
votes1
answer539
viewsMount an image from other images with PHP
Hello; I wonder if I can mount an image from other images sequentially. For example: Let’s say I have a register of words and images defined for each letter of the alphabet. When registering a word,…
-
0
votes2
answers932
viewsHow to merge images and text with PHP
Good afternoon. I’m trying to automate a process of creating badges for an event. I want when the user fills in the form information (name, company, email and photo), the filled information complete…
-
0
votes1
answer155
viewsGenerate transparent image through a form
Hello. I want to create a form with one input field and the other as Submit. When you write something in the input field and click the Submit button an image will be generated through the PHP GD…
-
0
votes0
answers638
viewsWrite about image with PHP
I need that from a form, the user can write his data, to be printed in a predefined image (will be an email signature) Follow code used, but image does not appear! HTML <form method="get"…
-
0
votes1
answer45
viewsHow to Make an Image with php
I’d like to instead of the black background for an image, do you have how? I’d like to do the same: <?php header("Content-type:image/gif"); $img = imagecreate(470,246); $azul =…
-
0
votes1
answer81
viewsProblem for "Save image as" php
I have a code that generates an electronic signature but when the user clicks right on the image generated to "Save image as" the name of the image comes as default name_pagina.php.png. How do I get…
-
-2
votes1
answer29
viewsError handling with PHP image upload library
I searched a PHP image upload library to use in my application, I chose this one. https://dhavalkapil.com/image-uploader/ I implemented and it is working and the success of sending an image results…
-
-4
votes1
answer410
viewsError showing image with GD
I’m trying to display a PNG image on the client’s browser screen using PHP, but only a black screen with a comic in the center appears. What am I doing wrong? Here’s my code: <?php $file =…