Questions tagged as 'gd'

1
answer

Use of memory PHP images

I have an upload of images and to handle the images I have already used ( ImageWorkShop and # Tested images: Imagem 01 (1920x1080 1,27MB JPG); Imagem 02 (4134x2362 132KB PNG); I have the following test code to upload (library Imag...
asked by 08.05.2015 / 20:22
2
answers

Write in image with php

I'm trying to print online certificates dynamically populated with PHP. The code I'm using is: class Certificado { public $nome_para_certificado = ''; public $modelo_de_certificado = ''; function __construct($nome) {...
asked by 20.09.2015 / 10:58
3
answers

Place an image in the center of another image in PHP

I have a .png image of eg 200x200px. I need it to stay 300x300px, but without enlarging the image, just putting it in and centering on a white square of 300x300px. Is this possible? How can I centralize this image? Remembering that I ne...
asked by 07.11.2015 / 23:04
1
answer

How do I save an image on a path by searching from an Oracle database?

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'"); oci_execute($stmt); $row = oci_fetch_array($stmt, OCI_ASS...
asked by 30.07.2018 / 22:47
0
answers

Working with Images - PHP

I have already worked and still work with some image manipulation libraries in PHP , but I decided to study the origin of the manipulations, how they work, how to implement and work with the images.    As we know the images are uploaded...
asked by 20.07.2018 / 20:36
1
answer

Problem creating a transparent background image

Hello, I'm trying to create an image in PHP just like the email of offers automatically submitted by CasasBahia. Example HomesBahia; I searched the internet and found the following code that helped me a lot; <?php header('Con...
asked by 16.04.2018 / 16:38
1
answer

Adapt transparency code in this PHP code

Hello, I want to put this code below in my current one that does image resizing via link ( <img src='resize.php?w=100&h=100&img=img.jpg'> ). $newImg = imagecreatetruecolor($nWidth, $nHeight); /* Checando se a imagem é PNG o...
asked by 17.12.2017 / 08:40
1
answer

Send image generated by PHP (GD) to Amazon S3

I have the following code to send an image up in my S3 bucket: // Send.class.php public function sendFile($file, $file_name) { try { $s3 -> putObject([ "Bucket" => "mybucket", "Key" => "image/".$fil...
asked by 02.12.2016 / 03:37
2
answers

Problem with resizing PNG images in PHP

Good evening. I'm having a virtual store script here, but I'm having problems with PNG images. When uploading an image like this: .Thescriptcheckstheextensionbasedonmimetype,"sanitizes" the file name and after that, generates 3 sizes of t...
asked by 08.11.2015 / 05:10
1
answer

Resize image in a square while maintaining proportion of the original PHP image

What happens is this: I'm pulling some product photos from an XML link, and the images come in different sizes. I currently use a code that takes the image and resizes it to 200x200, but images with different height and width obviously make i...
asked by 20.01.2017 / 18:15