Questions tagged [php-gd]

The PHP GD class contains built in image manipulation for PHP versions 4.3 and up.

The PHP GD class contains built in image manipulation for versions 4.3 and up. This class is commonly used for:

  • Adding filters to images
  • Adding watermarks to images
  • Changing image size for upload
  • Outputting an image to the buffer
  • Creating images on the fly (e.g. captcha verification)

A download of the library can be found at https://bitbucket.org/pierrejoye/gd-libgd/downloads

370 questions
0
votes
1 answer

How to merge multiple images together using GD library?

I have removed my original question as I have managed to partially get this working, what I have is 7 images,…
Udders
  • 6,914
  • 24
  • 102
  • 194
0
votes
1 answer

How to make an image itself Transparent/Alpha with GD?

In PHP GD, is it possible to make an image it-self transparent? I'm not talking about the background, etc. Is it possible to take a PNG image, and make the image transparent? For example: $c = imagecreatefrompng($urlToImage); imagefill($c, 0, 0,…
Alex
  • 1,398
  • 4
  • 15
  • 19
0
votes
1 answer

Yii: Corrupted image in CCaptcha

I have a trouble with the CCaptcha widget. Image is corrupted. Headers are looks right. When I tried to list an image as a text, I didn't find any text inclusions, it's looks like as a usual PNG content. When I created an another webapp on the same…
andre487
  • 1,261
  • 2
  • 18
  • 27
0
votes
0 answers

Centos :: Can't delete / remove package for updating

On my server I'm running PHP 5.5.1. I would like to install PHP-GD. But when I trying to install it, it always says: http://pastie.org/private/suerkbk7ogbuj5mtpduo7w it seems that the php-gd package is available on the server for php 5.3. I can't…
Kevin Gorjan
  • 1,272
  • 1
  • 17
  • 34
0
votes
2 answers

How to obtain width and height of image after rotating it?

How can I get the width and height of the image after rotating it using imagerotate() in PHP? Here is my code:
aslamdoctor
  • 3,753
  • 11
  • 53
  • 95
0
votes
1 answer

Putting breaks into a text written on a image

If i write a text on a picture with code below, code tries to type all the text in one line. So text overflows out of the image like in picture1. I want to write it like in picture2. If there is a function in php which enables writting like in…
mcan
  • 1,914
  • 3
  • 32
  • 53
0
votes
0 answers

how to fill a pattern(rotated 25 degree)

Let's say i have a image i want to fill this with with 25 degree. i rotate the image in php GD which gave me then when i create a new pattern and apply. i got the below is the code Html

sleeve long normal

MD TAHMID HOSSAIN
  • 1,581
  • 7
  • 29
  • 54
0
votes
0 answers

add croped image into original image

i will crop a part of image and blur the original image problem is : i want replace cropped image into original blur image, how to can do it? i do crop image with jcrop from JQUERY framework and this code is for crop if…
shahriyar3
  • 79
  • 10
0
votes
1 answer

include function and Graphs in PHP

i am using libCharts in my PHP application ....the graphs are working but when i include it in the application using INCLUDE function then it does not work it give me the error Warning: include(charts/charts-example-line.php) [function.include]:…
0
votes
1 answer

How to create image with unknown width and height ?

I want to create an image from a string and be abble to use this image as a background for a pdf that I'm generating. This is almost not an issue. I want the image generated to be a full size image and I know have two choices : First : Say that…
Thoma Biguères
  • 1,136
  • 4
  • 18
  • 42
0
votes
2 answers

Adding Text with GD Lib

I have been ripping my hair out with this and have tried many many solutions on here to no avail. I am trying to add some text to an image, but all it is doing is showing my background image, is there anything glaringly obvious that I'm doing wrong…
Shane Jones
  • 885
  • 1
  • 9
  • 27
0
votes
1 answer

Php-gd png image resize bug

I have a weird bug. When I create a thumb from a png image with transparent background, the thumb filesize is larger (173,56 KB 500×339 px) than original (64,98 KB 600x407 px). I think you should see this code to understand. Is php-gd library…
loicb
  • 587
  • 2
  • 6
  • 24
0
votes
0 answers

PHP - Replacing image background with new background?

I'm trying to replace a background of an image with a new background. The input image will be a greenbox image, which should get its green background replaced to transparent, afterwards a new background image should be inserted. it should go…
user1287145
0
votes
1 answer

Change image colors with GD

I want to learn about images manipulation in PHP and write some code to edit photos. So, I'm reading about imagefilter() function, but I want to edit the collors manually. I have a little piece of code with imagefilter to do a image…
Tomás Juárez
  • 1,517
  • 3
  • 21
  • 51
0
votes
1 answer

Show images in sites from objects

please let me know if you know how to develop what I really want to do. I have a code which creates an image (similar to a captcha) like this : /* createImg.php */ class createImg{ public function __construct(){ /*stuff here*/ } public…
themazz
  • 1,107
  • 3
  • 10
  • 29