Skip to content

Tag: gd

apt-get command not working on xampp, running windows 11

I’m facing error in wordpress on my local server while trying to edin an image, it says “Image rotation is not supported by your web host.” I have a Windows 11 64-bit PC that runs a XAMPP. I need to install a few things on this Apache server via command line, so I’m going to the &#8220…

Keeping a php script active

I was thinking of uploading some huge images onto my webpage and figured I could possibly optimize the load using a special image viewer with zoom functionality. As I’ve understood from long ago is that browsers have certain limits when it comes to image dimensions, and possibly memory as well. The work…

Convert PNG files with transparency to WebP using PHP GD

I have a utility class that loads image files and, among other operations, converts them to other formats. It uses PHP GD. Everything works fine except PNG files that have transparency are done wrong when converting to WebP. The result image has a black background where the transparency should be. This is my …

How to write text with opacity on a picture in PHP?

I’m writing a text on a picture. So far everything is fine, but I have to lower the transparency or opacity value of this text. I tried the following methods for the opacity value, but I couldn’t get any results. Actual result : https://prnt.sc/vy8axf Expected result : https://prnt.sc/vy8cnz Answe…

Problem pasting one image into another PHP

I want to paste the $original image into the center of $fondo image, i write the following code: The result i got is this: As you can see the cyan color is affecting original image: Any ideas on what i’m wrong? Thank you! Answer the solution is: Creating the image as imagecreatetruecolor instead of imag…

PHP getimagesize – Failed to open stream. Bad request

I am getting the following error: getimagesize(https://static1.squarespace.com/static/570d03d02b8dde8b2642afca/570f74e87c65e4819dec6812/57272dbfb6aa606f78a5d8b5/1470397291105/4XTRYCK3.jpg): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request The image opens without problems in my browser. Doe…