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

PHP GD - imagerotate for a jpeg image is not working

Title says JPEG. But I tried PNG. It didn't work. GD supports imagerotate function. if (function_exists('imagerotate')) { echo "test"; } It outputs the word test. So i assume I have imagerotate function. $im = imagecreatetruecolor($width +…
Mahesh
  • 1,503
  • 3
  • 22
  • 33
0
votes
2 answers

How to use php imagecreate code on the same php page?

Basically I am in the process of creating a very simple one page .php template that I can easily use for multiple sites. I do not want to have to drag along extra files and such. I am aware of the imagecreate feature and know how to implement it.…
Garry
  • 251
  • 2
  • 13
0
votes
1 answer

How to get thumbnail images in zend framework

I have larger images stored in one folder. I dont want to create thumbnail images, store it some place and retrieve. I am looking for script to create thumbnail images of larger images dynamically and display in the browser but never storing the…
rockstar
  • 1,322
  • 1
  • 20
  • 37
0
votes
1 answer

PHP - Dynamic Image Generation

How do I create dynamic images using php which depend of $_GET['x'] variables?
Mike Burnwood
  • 279
  • 1
  • 2
  • 15
0
votes
1 answer

PHP GD Extension is not loaded on IIS 7.5

PHP GD Extension is loaded and working on local server but it is not loaded correctly on our live server even though I am using all the exact same files. (PHP GD is working fine here) Local Server: Microsoft Windows Server 2003 For Small Business…
Jonas T
  • 2,989
  • 4
  • 32
  • 43
0
votes
3 answers

PHP-GD Image re-size loses the quality of the image

I've made this piece of code, it will re-size images on the fly, if it can't find the requested image, and then stores it. The only problem with this is that the output jpg image has a low quality. I was wondering if there is something I need to…
Yasser1984
  • 2,401
  • 4
  • 32
  • 55
0
votes
2 answers

compression of 100 still loses quality on PHP GD

When I Use: imagecreatefromjpeg() and the $path parameter is a URL. I save the jpeg at 100 compression... Yet I still get slight quality loss... Is there a way to prevent this?
AlexMorley-Finch
  • 6,785
  • 15
  • 68
  • 103
0
votes
1 answer

How to rotate an image properly in php?

I am using imagerotate() function to turn the image below to a 30 degree angle. http://postimage.org/image/b7w6dacel/ The problem is that whenever I rotate the image and save it to a new path, in the new path the image is rotated but it has a black…
user875139
  • 1,599
  • 4
  • 23
  • 44
-1
votes
1 answer

Modifying an image in php

I have an image which i used as a template in php script .I have to edit certain portions of that image and add some text,pictures on that image during runtime.Now the problem is the image is to be modified at a large(but predefined) number of…
mukesh
  • 726
  • 1
  • 11
  • 27
-1
votes
1 answer

Why is php code not giving the output of image?

this is the code It is giving output as The image "http://localhost/firstprogram.php" cannot be…
Amateur
  • 21
  • 4
-1
votes
1 answer

Image color changed with imagecreate in php

I have to create dynamic student card image. add put this image object in student profile photo. But, student image color are changed. How to put student profile photo with original color? Here is my code: header("Content-Type: image/jpeg"); $im =…
Bharat Chauhan
  • 3,204
  • 5
  • 39
  • 52
-1
votes
1 answer

Notice error while counting number occurrences

I'm creating a simple .php script that Generates an array with random numbers (let's say 1000 integers) Outputs an image, where it displays all these numbers' arrangement on a scale from 0 to the largest number drawn The output is an image (with…
Lis
  • 555
  • 4
  • 26
-1
votes
1 answer

crop image without disturbing aspect ratio

** In image processing, while cropping images, aspect ratio is maintained on any site or app. Even uploading images as profile photo on whatsApp and Facebook, we cant edit both height and width separately Why we cant edit the way we want **
-1
votes
1 answer

PHP saving imagecreatefrompng

I want to save my pngs, but my code does not allow me to create new pngs or overwrite the existing ones. Ideally every time the page is loaded the image would be saved.
LeBlaireau
  • 17,133
  • 33
  • 112
  • 192
-1
votes
1 answer
1 2 3
24
25