Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
0 votes
0 answers
49 views

When I want to upload a JPG image to my Laravel ecommerce website this error occured: Call to undefined function Intervention\Image\Drivers\Gd\Decoders\imagecreatefromjpeg() But when I uploaded a PNG ...
mithun banerjee's user avatar
2 votes
1 answer
115 views

Previous to PHP8 imagedestroy($image) would be used to clear image resource data from the server memory. This is very useful on crowded situations and especially when dealing in loops with processing ...
Mm-Art-In's user avatar
  • 23k
0 votes
1 answer
206 views

Trying to install php-gd on Oracle Linux 7 with php7.4. sudo yum update sudo yum install php-gd Any of the above command generates below error: Loaded plugins: langpacks, ulninfo Resolving ...
Tahmidur Rahman's user avatar
0 votes
1 answer
66 views

found some code on here at PHP - Create one image from images, the code works however, when I look at the output the edges of each image are extremely low quality (blocky). Here is the code I'm using, ...
Simon's user avatar
  • 77
0 votes
1 answer
58 views

function generateRandomString($length = 10) { $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $randomString = ''; for ($i = 0; $i < $length; $i++) { $...
Harsh Vishwakarma's user avatar
0 votes
0 answers
180 views

I have an older Ubuntu 18 box that for the life of me i cannot get GD working with my php 8 No matter what i try the gd.so file does not get placed in the correct directory. I have multiple versions ...
Paul Cullen's user avatar
0 votes
0 answers
88 views

public static function font_preview_img($font_name='', $path=''){ $font_size = 25; $im = imagecreatetruecolor( strlen($font_name)*$font_size, $font_size*2); imagesavealpha($im, ...
Denver Kunaka's user avatar
1 vote
1 answer
166 views

I'm trying to generate an image using php-gd but the output is only special characters. Did I use the "header('Content-Type: image/png')" correct? My Image Class: public function __construct(...
dual inline's user avatar
1 vote
1 answer
2k views

On calling the function imagettfbbox(), I'm getting the error Fatal error: Uncaught Exception: Function "imagettfbbox" does not exist: check your FreeType installation in... I understand ...
user1729972's user avatar
1 vote
0 answers
1k views

Is it possible to compress PNGs with results similar to TinyPNG/PngQuant in regards to size reduction and quality retention, using vanilla PHP tools like PHP/GD, PHP/Imagemagick and/or intervention/...
Kos-Mos's user avatar
  • 747
0 votes
1 answer
435 views

I am trying to resize an 4764 × 2680 pixels image to a 960px width image preserving it's aspect ratio. When doing this operation directly with Imagemagick command line tools, the output image would be ...
Kos-Mos's user avatar
  • 747
3 votes
1 answer
1k views

I have php8.1 running on FreeBSD 12. Install php81-gd and having a trouble to start php due to the following error: Any guess how to fix it, please? PHP Warning: PHP Startup: Unable to load dynamic ...
Bakhtiyor's user avatar
  • 7,318
3 votes
1 answer
4k views

I installed php-gd and then check if is installed like this [root@LP01-Dev ~]# php -v // checking before installing gd PHP 7.3.33 (cli) (built: Nov 16 2021 11:18:28) ( NTS ) Copyright (c) ...
체라치에's user avatar
3 votes
0 answers
8k views

Is there any way to specify installed GD extension version? Currently I have following Dockerfile: ARG PHP_VERSION=8.1.1 FROM php:${PHP_VERSION}-fpm-alpine RUN apk add --update --no-cache freetype ...
rvaliev's user avatar
  • 1,091
2 votes
0 answers
51 views

Got a strange thing in production env. Alpha channel overwrites underlying non transparent part after imagecopyresampled. In dev it works as expected: But in prod im getting this: $bubble = ...
Asgu's user avatar
  • 742
1 vote
0 answers
717 views

I have search all over the internet just to find a solution for this problem. I have php7.4 installed on my system. I have been struggling with the php-gd extension. I have been able to install the ...
MusheAbdulHakim's user avatar
0 votes
1 answer
2k views

I want to install gd extension in my current php-project(php version is 7.2.34) for that i use this command sudo apt-get install php7.2-gd it's throwing following error and it's not showing in the ...
Code cracker's user avatar
0 votes
0 answers
681 views

I have this code working before (6 years ago) while upgrading to the latest PHP8, it doesn't work anymore, well it does when using absurd way putting "error_reporting(0);" $a = ...
Lutianna's user avatar
  • 543
0 votes
0 answers
59 views

The PHP code below is supposed to center the letter "M" vertically and horizontally. Vertically it is perfectly centered, but horizontally it is off. What is really strange is that the ...
Clayton's user avatar
  • 392
0 votes
0 answers
128 views

I have a 500 kb image and I wanna compress it using PHP GD or Imagick library. But I didn't found any function or method to compress the image to the desired size (150 KB). The function should try to ...
shank sharma's user avatar
1 vote
0 answers
289 views

I try to install Wordpress using Virtualmin manager. During the installation the manager return: Error: Unable to find a match: php74-gd after command: /bin/dnf -y install php74-gd I have PHP 7.4 and ...
nsc's user avatar
  • 117
0 votes
0 answers
169 views

I want to create certificates for users on my website but following code isn't working and only showing grey square when loaded on localhost... <?php header('content-type:image/jpeg'); $font="...
Mayur Jadhav's user avatar
0 votes
1 answer
149 views

Note: The question is specific to PHP GD library only This question is NOT about how to crop image to a target aspect ratio, rather it is about how to draw overlay extending outside the image I want ...
y2k-shubham's user avatar
  • 11.8k
0 votes
2 answers
913 views

I've got stuck with using of GD library. I have installed and enabled at php.ini (extension=gd2) the library but when I try to use it I'm getting the error: Call to undefined function App\Http\...
Angry Beaver's user avatar
1 vote
0 answers
47 views

I've got a problem with php-gd, I use php-gd to resize png with transparent background file. after that, I put the resized png with <img> and set a background color #wheat on HTML file. But the ...
evenloooo's user avatar
0 votes
1 answer
108 views

I am using imagick to convert generated pdf to jpg/png and save it to server. All works well but after install php-gd because of use png images in mpdf all text in generated jpg are black. Here is my ...
Milan Lidmila's user avatar
1 vote
3 answers
3k views

After some point, Scrutinizer started permanently failing when trying to analyse Sylius plugins code with next errors: - sylius/sylius v1.7.3 requires ext-gd * -> the requested PHP extension gd is ...
igormukhingmailcom's user avatar
2 votes
2 answers
7k views

I am trying to install moodle but it shows php-gd extension is missing/should be enabled. However the gd is already installed and latest, and when I command php -v I get the following error as ...
Jeff Seven's user avatar
1 vote
1 answer
773 views

I am using 7.2.27 PHP version with Laravel 7. Below code working on my local same configuration, $captured = imagegrabscreen(); imagepng($captured, "~path/" . time() . ".png"); imagedestroy($...
Jaydeep Mor's user avatar
  • 1,723
2 votes
1 answer
111 views

I'm trying to make a degree color image in the PHP GD library. I just made a simple code that works fine with 2 colors, but, if I put more than 2, it makes something strange. My code: function ...
El Tito Barte's user avatar
0 votes
1 answer
4k views

I'm trying to install the php7.3-gd extension. When I try to: sudo apt-get install -y php7.3-gd I recieve the output: Reading package lists... Done Building dependency tree Reading state ...
John Schmitz's user avatar
1 vote
1 answer
2k views

I'm trying to deploy my project with Heroku and I need to install gd on my server. My composer file structure looks "require": { "ext-gd": "*", } When I making composer update i catch the ...
Anton Tkalich's user avatar
-1 votes
1 answer
77 views

this is the code <?php $x = imagecreatetruecolor(250, 250); $y = imagecolorallocate($x, 120 ,156,100); header('Content-Type: image/jpeg'); imagejpeg($x); ?> It is giving output as ...
Amateur's user avatar
  • 21
2 votes
1 answer
4k views

I'm having some trouble creating a clean looking image transcode from webp to jpeg using PHP's GD library. As a point of reference Here is a jpeg version of the original using Google's demo here: ...
You Old Fool's user avatar
  • 23.2k
1 vote
1 answer
486 views

I am using the PHP GD library for image processing in my Laravel Application. My application is deployed on AWS Lamda. I am trying to use custom fonts in GD Library. The function imagettftext ...
Vikas Roy's user avatar
  • 864
1 vote
2 answers
709 views

This code returns false: $image = imagecreatefromjpeg("photos/profiles/original/4cdf149b63d0ca0158f68357d8da371c_y.jpg"); var_dump($image); exit; But this code: $image = ...
Tolgay Toklar's user avatar
0 votes
1 answer
572 views

I am trying to resize an image with imagecopyresampled() and at the same time remove the EXIF data from the image with imagecreatefromjpeg() before uploading to S3. I am not sure what I am missing, ...
Sol's user avatar
  • 1,059
5 votes
3 answers
328 views

Inspired by this code, I am trying to create a simple bar chart able to dynamically create, resize both bars and texts depends on the the $data, $height and $weight: <?php $width = 300; $height = ...
celsowm's user avatar
  • 474
0 votes
2 answers
693 views

I am using Symfony 3 and when I try to use imagecreatefromjpeg function in PHP it gives the following error. Attempted to call function "imagecreatefromjpeg" from namespace "AppBundle\Controller" ...
Teshan N.'s user avatar
  • 2,615
19 votes
5 answers
3k views

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 works ...
user2342558's user avatar
  • 6,804
4 votes
1 answer
1k views

I am trying to compress & resize my images using the php GD library. Nearly every answer on SO and everywhere else is the same, but for my solution, the PNG's are not being correctly transformed, ...
Dennis's user avatar
  • 3,860
0 votes
0 answers
54 views

Struggling to get the math correct for image cropping, hoping someone else is able to see my issue. It appears to be overshooting the dimensions of the image leaving 1 pixel of the original image on ...
zanderwar's user avatar
  • 3,779
3 votes
3 answers
2k views

2 of my sites are not working bcs I can't install php5-gd library to Debian Wheezy php5.6 ... I tried aptitude install php5-gd, and system said i miss 2 dependencies, which i can not find or ...
Milos Novakovic's user avatar
0 votes
0 answers
539 views

I wanted to make a Teamspeak Bannerbot, i downloaded a rar and now the website says, that php-gd isnt installed. After i installed it the same error came. Here you can see the index.php code, were it ...
Sebi's user avatar
  • 33
15 votes
2 answers
34k views

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 this but ...
andre.hey's user avatar
  • 365
3 votes
0 answers
1k views

i know this question has already been asked, but it didn't have an answer that worked for me and i cannot comment as i do not have enough reputation. I'm not able to install php-gd extension on my ...
g s's user avatar
  • 29
5 votes
1 answer
5k views

I am using Laravel framework and image/intervention library for generating images with dynamic data. The code is running perfectly fine on my local machine but as soon as I upload it on aws ubuntu ...
sajag16642's user avatar
1 vote
3 answers
417 views

I want to colorize some PNGs using PHP GD. For testing purpose i hardcoded the color red (255,0,0) which later will be replace by a dynamic variable. For example i have these two images: Image 1: ...
user avatar
1 vote
1 answer
3k views

I have Ubuntu 14.04 and php7.2 but can't install php7.2-gd I need to install package php7.2-g when i run apt-get install php7.2-gd it says that: E: Unable to locate package php7.2-gd E: Couldn't ...
ildar's user avatar
  • 195
1 vote
0 answers
250 views

I want to know which will consume more cpu resources? Resizing and serving image live via image_filter module in Nginx Or Resizing and serving images live via PHPGD in PHP Script Since both use GD ...
Future King's user avatar
  • 3,849

1
2 3 4 5
8