Questions tagged [gd]

GD Library is used to dynamically create and manipulate image files.

Filter by
Sorted by
Tagged with
-1 votes
1 answer
35 views

I cannot get PHP GD image resizing scripts to work

I have watched many videos about resizing images with PHP and GD and I have cut-and-pasted much code that I'm told will do the job, and yet I can never get image scripts to resize or even display ...
user87842's user avatar
2 votes
1 answer
51 views

How can I draw a semi-transparent shape on another image with Perl and GD?

I'm trying to draw a semi-transparent block onto an existing image using Perl's GD.pm. My code looks like this: use strict; use GD; my $img = GD::Image->new('cello.png'); GD::Image->trueColor(1)...
anaximander's user avatar
-1 votes
0 answers
47 views

How do you resize images using gd in php

Ive just started learning php and i keep getting errors trying to use gd to resize images. I enabled gd in xampp but nothing works. I keep getting these errors: Uncaught TypeError: ...
fraxti's user avatar
  • 1
0 votes
0 answers
20 views

GD2 won't resize images - deprecated error on Magento 2.4.4-p6 and PHP 8.1

Upgraded to latest version of Magento 2.4.4-p6 and now GD2 will not resize my images [2023-11-09T00:29:45.553851+00:00] main.CRITICAL: Exception: Deprecated Functionality: Implicit conversion from ...
aidin's user avatar
  • 111
0 votes
0 answers
16 views

PHP Issue with using imagefill() for a white background working differently for different images

I have this code, it work on some images and don't work properly on other images and need some code commented to make it work on some other images. $xOffset = ($width - $image_width) / 2; // Resample ...
Inderjeet Singh's user avatar
1 vote
0 answers
21 views

PHP GD set PNG image resolution with decimal

We do lenticular printing and usually the resolution of the image we work with will have a decimal point. For example, $file_name = "example.png"; $resolution = 400.85; imageresolution($...
Susan Lauri's user avatar
0 votes
0 answers
19 views

Command (GetMimeType) is not available for driver (Gd)

I'm trying to use Intervention/Image library to resize my uploaded image file. but I'm getting this error: "Command (GetMimeType) is not available for driver (Gd)." when I checked with ...
dapidmini's user avatar
  • 1,532
2 votes
1 answer
46 views

Remove transparent background from uploaded PNG files

We want all the uploaded images to start from the same position so we would like to crop/remove the transparent backgrounds from the images. Here are 2 examples of images uploaded: As you can see the ...
john's user avatar
  • 45
0 votes
0 answers
26 views

Jump to GD32F303 System Memory

There were many example codes for downloading firmware by jumping into System Momory with ST32 products. I've tried and am satisfied and in use. However, there are few example codes for GD32 products. ...
김무성's user avatar
0 votes
0 answers
32 views

Resize image does nothing in a CodeIgniter4 app

I am working on a project, I try to create a feature that resize an image previously sent in a form. The form works correctly and I can display the images on a view. In a little gallery, there are ...
yohaneli's user avatar
8 votes
1 answer
415 views

Find out libwebp version from PHP (Windows)

Due to a recent vulnerability in libwebp before version 1.3.2 (CVE-2023-4863) I want to find out what libwebp version the Windows builds of PHP (downloadable here: https://windows.php.net/) is using. ...
Jost's user avatar
  • 5,810
0 votes
0 answers
39 views

Intervention Font, Text align center, wraps around left edge

I am trying to generate text on an image. To be able to position the image properly in backend, I need to generate an image of the text, then place the text-image on the real image. (Laravel 10) When ...
Line in Linus's user avatar
0 votes
1 answer
66 views

Draw lines and write text on animated GIF image using PHP

Hello lovely swarm intelligence! I have some PHP code, which draws lines in form of a grid system to an image and afterwards, it also writes some text on this image. My code works as expected with ...
checker284's user avatar
  • 1,286
0 votes
0 answers
50 views

Laravel & PHP GD Library issue

I have issue with php gd library, i just installing php gd library in my server when im hit this command it will return gd, that means gd library already installed in my server. php -m | grep gd But ...
Helsinki's user avatar
1 vote
0 answers
54 views

PHP gd Instalation on Ubuntu

i just try to instal php gd library in my ubuntu server with this command sudo apt-get install php7.4-gd but always return Reading package lists... Done Building dependency tree Reading state ...
Helsinki's user avatar
0 votes
0 answers
32 views

PHP GD error when calling imagecreatefromstring() on some images

I found myself in front of that error on PHP when trying to call imagecreatefromstring() on some pictures (not all) imagecreatefromstring(): gd-jpeg, libjpeg: recoverable error: Invalid SOS parameters ...
Florian C's user avatar
1 vote
0 answers
50 views

using PHP's GD to create text with different colors for letters in same word

I am trying to create a PNG using PHP to create text with 2 separate colors. As you can see, $text = "bluewhite";. Currently I have the code to create the entire $text appear as white, but I ...
demooon's user avatar
  • 11
0 votes
1 answer
66 views

Too many arguments for move_and_slide() call [duplicate]

extends CharacterBody2D var speed = 150 var jumpforce = 500 var gravity = 700 var vel = Vector2() func _physics_process(delta): if Input.is_action_pressed("player_left"): vel....
kori's user avatar
  • 1
0 votes
1 answer
62 views

How to write a phpunit test for a function that uses GDImage imagecreatefromstring

I am writing a test for a service that creates an image using the GD library. Under normal operation, the method runs the following without issue: imagecreatefromstring($this->imagick->...
Cef's user avatar
  • 687
1 vote
1 answer
85 views

Send image to browser as a PHP post response

So, I'm making a post request with CURL: <?php $url = 'http://url/to/site'; $data = array( "tk" => $_GET["tk"] ); $ch = curl_init($url); //seteamos la petición ...
Ariees Andromeda's user avatar
0 votes
1 answer
278 views

Fatal error: Uncaught Error: Call to undefined function ImageCreate()

I am getting following error while generating qrcode in php. Error: Fatal error: Uncaught Error: Call to undefined function ImageCreate() Fatal error: Uncaught Error: Call to undefined function ...
Hello World's user avatar
  • 2,733
2 votes
2 answers
77 views

SetEnv GDFONTPATH in Apache config not being read by libgd in PHP

Short Question I want to pass GDFONTPATH environment variable from Apache vhost.conf to PHP. How can I do this? I am running: Debian 12, Apache 2.4, PHP 8.2 Long question I am using GD image functions ...
Peter Ryan's user avatar
0 votes
0 answers
43 views

phpgraphlib dark image with php 8.2 -> error handeling

I have worked multiple years with the PHP-Library chart generator. I have made hundreds of charts. I have made the upgrade with my server to PHP8.2 and guess? The library doesn't want to work anymore. ...
gvanaco's user avatar
1 vote
0 answers
97 views

How to read a tiff file in php?

I know in the past the php Image processing and GD library has not supported reading a tiff file like imagecreatefrombmp and imagecreatefrompng. Just wondering if anyone knows has there been any ...
Cef's user avatar
  • 687
1 vote
0 answers
687 views

Unable to install php-gd with php8.1 on ubuntu 22.04

If I try to run anything like apt install php8.1-gd or php8-gd or php-gd I run into the same error, which says E: Package 'php-blabla' has no installation candidate System info: Ubuntu 22.04 PHP 8.1....
mifu100's user avatar
  • 11
0 votes
0 answers
118 views

Compiling GD 2.3.3 for existing PHP 7.2.34

The Amazon Linux 2 AMI server has php with version 7.2.34. It contains the GD 2.1 bundled GD Support => enabled GD Version => bundled (2.1.0 compatible) Now I would like to upgrade the GD to ...
complez's user avatar
  • 8,002
1 vote
0 answers
25 views

php imagerotate image size grows

I'm trying to bring the php gd library into a class structure by myself. Every time I use the imagerotate function the image size gets bigger. <?php class ImageManipulator { private $image; ...
DCYılmaz's user avatar
0 votes
0 answers
8 views

how to fix instance based nill problem plezase

extends Node2D @onready var timer = $Timer var obstacle = preload("res://enviroment/obstacle.tscn") func _ready(): randomize() func _on_timer_timeout(): spawn_obstacle() func ...
techno gaming kirat's user avatar
1 vote
1 answer
60 views

php imagick distortImage to remove paper folds using 4+ point coordinates

I am trying to flatten photos/scans using php and [maybe] Imagick and figured distortImage would be the appropriate function, but I'm not sure if I'm on the right track. The original images might be ...
user1432181's user avatar
0 votes
1 answer
73 views

Can not load curl, gd and imagick PHP extensions

I am using the following configuration on a local machine: PHP 7.4.27 Apache 2.4 Windows 7 x86 (32 bit) All the paths are set. All the lines in config files are uncommented. Everything works fine, ...
pau's user avatar
  • 372
0 votes
0 answers
144 views

Intervention Image installing problem in laravel

I am having trouble installing the intervention/image package on Windows OS and laravel 10. I followed these steps: Typed the following command in my project directory terminal in VS Code: composer ...
Md. Sazzadur Rahman Zitu's user avatar
-1 votes
1 answer
40 views

Coding oldschool textCaptcha nowadays is good idea?

I am creating my own tool related to GDPR (https://my.oodo.pl) and recently, taking into account privacy doubts related to GA, reCaptcha (i was using recaptcha V3), Google Fonts (Schrems II), I ...
Gawrion's user avatar
  • 87
0 votes
0 answers
245 views

GD library with PNG support required for image (alpha channel)

I am facing an issue in MPDF, when adding an image with transparent background in a PDF file. GD library with PNG support required for image (alpha channel) (b3d143b43610428bba3fcacafa40fdf6) in file: ...
Akshit Arora's user avatar
3 votes
1 answer
190 views

How to trim a png image while preserving inner transparency?

I need to trim an image such that the transparent area around the image is removed. However, the image has some inner transparent area also which is getting colored on running the following function: $...
dc09's user avatar
  • 416
0 votes
1 answer
660 views

Laravel controller using Intervention Image for image resize/crop is outputting pixelated images

I've made this class for Laravel that leverages Intervention Image Cache to process and cache images uploaded by the user. This class is called via a GET endpoint that passes things like image URI, ...
tom f's user avatar
  • 370
0 votes
1 answer
133 views

Makes rounded corners on image using PHP GD

im using the function from @Enyby post to rounded corners on image but it does not work. https://stackoverflow.com/a/52626818/14787718 Can anybody help me fix @Enyby's function? function roundCorners($...
wowtom16's user avatar
1 vote
1 answer
22 views

Does GDlib support font fallback to render text with all kind of languages?

I want to render text in ASCII as well as Ethiopic / Amharic script (but it would be good to support characters for a wide range of languages). The font Noto is installed on an Ubuntu system using ...
Alex's user avatar
  • 33.4k
0 votes
0 answers
28 views

How not to lose the transparency of png when superimposed on another picture PHP?

I have 2 pictures one will be as a background and the other should overlay it with a rounded corner. Png corners made transparent as i need. now when i want to impose on the other picture that ...
Almazq's user avatar
  • 1
0 votes
1 answer
88 views

Transparency not preserved after applying imagecopyresampled

I have a question related to the GD library on PHP. I can't add a transparent image to the canvas in a way that preserves the transparency. Here is the output that I get Here is the code that I used $...
Daniel Abyan's user avatar
1 vote
0 answers
67 views

Can't get image from storage with file_get_contents() (Laravel)

Today I've encountered a problem, probably a silly one. Basically I want to merge generated qr code image and my selected template image into one using GD library. This is my code: for ($i=1; $i <= ...
Laimonas Rupeika's user avatar
0 votes
0 answers
25 views

Scale an image with no interpolation using the GD Library

I have this image that I'm trying to scale to 64x64 and replace with the background color with a transparent one. I got the transparency down, but I can't seem to disable the interpolation so the ...
Green Mtn's user avatar
  • 447
0 votes
0 answers
228 views

GD loaded but not working in PHP development server

After having spent a good few hours with this, I still can't get this to work. I'm using XAMPP with PHP 8.1.6. This is a Laravel 9 project and I'm trying to use GD library. Also, I'm using Laravel's ...
dotNET's user avatar
  • 33.8k
0 votes
0 answers
48 views

The function imagealphablending() does NOT make any difference in creating a PNG image, why?

I am creating a PNG image on the browser using PHP GD library. Current PHP version: 5.6.40 GD library version: 2.1.0 OK, so the code to create a PNG image is given by: <?php $width = 500; $height =...
Sachin's user avatar
  • 1,646
0 votes
0 answers
115 views

Problema with Debian 5.14 and php8.1-gd

A have a problem. I need the php8.1 and I intalled. But, a try install extensions how: gd with command: sudo apt install php8.1-gd and have a problem: enter image description here Translate: Reading ...
Men's user avatar
  • 1
-1 votes
1 answer
142 views

GD Library extension not available with this PHP installation. Laravel 9 Error

I work with Laravel 9 and when I want to use Image::make($image)->save('upload/home'.$name_gen); which I added earlier, I am getting the error: GD Library extension not available with this PHP ...
Lucas's user avatar
  • 11
0 votes
0 answers
49 views

How to apply PHP GD and image functions to image retrieved from mySQL DB?

I am new to PHP and a little rusty when it comes to programming in general... I have images on my Mac that I select and upload via PHP as blobs in a mySQL DB. They will then be embedded in a gallery ...
GSinIL's user avatar
  • 1
1 vote
1 answer
93 views

Centering text within an image and rounding corners

I'm a php beginner and I couldn't find a fix how to make rounded corners for the dynamic image or to add the text that displays the IP in the center of the image <?php // Create the image $image = ...
MASTER's user avatar
  • 13
1 vote
1 answer
44 views

PHP - Create thumbnail from picture and keeping proportion

I want to create a thumbnail image without black/white bars and have it keep aspect ratio The thumbnail size should be 320x200 (px). I actually wrote a function to create a thumbnail for a given ...
adammms's user avatar
  • 11
0 votes
0 answers
70 views

php GD library sometimes generate blank image

I trying to generate a signature from a name using the GD library, and return the png image in base64 format. With the following code, the function correctly returns the base64 image with the ...
Phyron's user avatar
  • 613
0 votes
1 answer
96 views

PHP gd library imagepng function not overwriting

My files are hosted online at A2 hosting. Essentially part of my website creates an image in 'images/$var.png' where $var is passed into the file that creates the image. Later on another php file runs ...
nightfeathers's user avatar

1
2 3 4 5
60