php-gd Questions

6

Solved

Why am I getting the error PHP Fatal error: Call to undefined function imagettftext() on line 29? <?php ob_start(); session_start(); $strings = '123456789'; $i = 0; $characters = 6; $code = ''...
Amadou asked 3/9, 2011 at 3:25

4

Solved

I'm having troubles when trying to create an image using imagecreatefromjpeg using this Dockerfile to generate the container: FROM php:7.1-apache RUN apt-get update && \ apt-get install -...
Truesdale asked 14/11, 2017 at 17:50

4

I'm trying to add some features to PHP GD installation. I'm using Docker PHP "Official" release as base (php:7.1.15-fpm-jessie). My current production environment uses CentOS, which GD module come...
Landin asked 8/3, 2018 at 14:9

7

Solved

I was trying to install php5-gd but after ran this command: yum install php-gd php-tidy and tried to restart apache: httpd -k restart I got the following error: httpd: Syntax error on line 5...
Hedve asked 11/12, 2013 at 4:56

2

Solved

I get the error from my cakephp 2.x project: The PHP GD extension is required, but is not installed. I use php7.3 with apache on debian I search and find apt-get install php7.3-gd I tried th...
Kwabena asked 7/8, 2019 at 7:46

5

I'm trying to write a PHP script that resizes a PNG image and then converts it to PNG-8 bit mode. So the size of the resulting file will be smaller but without too much quality loss. The resize wor...
Cytolysin asked 18/9, 2019 at 11:53

3

I'm getting this error when trying to deploy using alpine: phpoffice/phpspreadsheet 1.2.1 requires ext-gd * -> the requested PHP extension gd is missing from your system. Here's my Dockerfile...
Warble asked 24/4, 2018 at 10:8

2

Solved

I'm currently trying to work with pictures and PHP, thanks to GD functions. Now I would like to modify the size of PNG pictures. Here is an example of a PNG I'd like to resize : The dotted line ...
Bought asked 10/8, 2017 at 9:29

8

Solved

How do I check if a PNG image has transparent pixels using PHP's GD extension?
Toro asked 31/3, 2011 at 4:17

1

Solved

I'm having a problem getting GD Jpeg support through the Alpine image for PHP-FPM. I've tried every combination I can think of to get this working. Below is a snippet from my Dockerfile: FROM php:...
Redhot asked 9/1, 2018 at 13:15

2

I am losing color information, seemingly the blue channel, from an image after using GD to read from the WebP version and output a JPEG. Why does this happen and how can I fix it? Original Image ...
Sough asked 20/9, 2015 at 19:41

2

Solved

I found the question How to check if an image has transparency using GD? but the the answers are all for PNG files. Is there a solution for checking if a GIF image has transparency in PHP using the...
Abomasum asked 29/1, 2018 at 2:50

3

Solved

When I'm trying use php-gd functions on incorrect png images, I have Fatal PHP error. It seems to be some kind of bug, because accordingly to the functions documentation (imagecreatefrompng, for ex...
Morey asked 18/7, 2017 at 18:41

2

Solved

I just loaded an image into memory via $img = imagecreatefromjpeg($filename); Then, I applied a rotation to the image: $r_img = imagerotate($img, $angle, 0); Per the docs, imagerotate...
Carley asked 8/1, 2018 at 20:51

4

Solved

So I am creating a banner generator. I will be adding text in the middle, but would like it to be exactly in the center. I know that imagettftext can be used to write onto the banner, but that won...
Otila asked 7/4, 2014 at 19:8

2

Solved

I have to create a PNG / JPEG image from PHP script .. Briefly The code will create a html table and will include an image in that page. I need to save this entire page as an image , save that ima...
Grownup asked 16/3, 2012 at 4:56

1

I have a png which is supposedly corrupt, but still loads in all desktop image viewers, but not php. The error when calling imagecreatefrompng is: Warning: imagecreatefrompng(): gd-png: fatal l...
Bakken asked 27/12, 2016 at 2:14

4

Solved

I'm using Curl via Proxies to download images with a scraper I have developed. Unfortunately, it gets the odd image which looks like these and the last one is completely blank :/ When I te...
Pennsylvanian asked 24/1, 2012 at 22:18

3

Solved

Im trying to pass a merged image from php into a html meta tag (for a twitter summary card if you're wondering) but the data of the image is not being passed. When I run this code I get no errors f...
Accepter asked 28/8, 2016 at 7:41

3

Solved

i've implement this method (by following php tutorial) for create preview of an images: function createPreview($image_path, $filename) { header('Content-Type: image/jpeg'); $thumb = imagecreate...
Spectral asked 26/2, 2015 at 9:33

1

Solved

I have the following code to print text on an image. I am also adding a debug box around the text. However, I noticed the text on the left lies outside of the box that PHP gives me with imagettfbbo...
Liberality asked 4/12, 2015 at 18:4

5

Solved

I try to create a captcha code image with php gd : $im = imagecreatetruecolor(100, 25); $white = imagecolorallocate($im, 255, 255, 255); $black = imagecolorallocate($im, 0, 0, 0); imagefilledrecta...
Ezar asked 8/10, 2015 at 17:22

6

Solved

I recently discovered NginX, and decided to try it out on my server. I have NginX running and able to serve PHP and HTML files. But now I want to try to install drupal. When trying to install it an...
Assemblage asked 13/1, 2012 at 23:23

2

I already checked the file with mime type. If it is jpg or gif it is working perfectly with $src = imagecreatefromjpeg($tmpName); and $src = imagecreatefromgif($tmpName); but if the image is...
Anglonorman asked 16/9, 2013 at 5:50

4

Solved

How to install/enable php-gd and mcrypt in Yosemite 10.10 - PHP 5.5.14 build? note that following steps install newest PHP 5.5.x To check if you have gd and mcrypt installed use $ php -m to displ...
Espadrille asked 21/10, 2014 at 18:32

© 2022 - 2024 — McMap. All rights reserved.