Questions tagged [gd]

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

GD is an acronym for GIF Draw, GD is an open source code library for the dynamic creation of images by programmers. GD is written in , and "wrappers" are available for Perl, PHP and other languages. GD creates , and images, among other formats. GD is commonly used to generate charts, graphics, thumbnails, and most anything else, on the fly. While not restricted to use on the web, the most common applications of GD involve website development.

2961 questions
1
vote
4 answers

Problems in installing perl GD module

I am using perl Module Managerinstaller on RHEL 6 and perl version is 5.10.1 At first when I tried to install the GD module, it showed me I have some dependencies missing. After installing those dependencies I am getting the following error. Can't…
1
vote
0 answers

saving a PNG image as vector PDF in php

Ive a script to generate an image using imagemagick in PHP, after designing i need to create a pdf to print and this pdf need to be like a vector one, even if we zoom in the content should be crisp, but my pdf is not so, can some one guide me how to…
San
  • 632
  • 4
  • 13
1
vote
2 answers

In PHP, how do I use the GD library created image directly on my website

I'm not sure I understand quite how this works. For a website form I'd like to generate a random captcha image and display it along with the form. So ideally I would like something along those lines:
... …
Jens
  • 8,423
  • 9
  • 58
  • 78
1
vote
2 answers

GD PHP dynamic pie chart generation issue

I've created a dynamic pie chart with the GD extension using the image filled arc function. I pass to this script, via HTTP GET variables, up to 11 values. the first value, n, is the number of values that follow. n1,n2,n3, etc. are the data…
trip0d199
  • 228
  • 4
  • 9
1
vote
2 answers

opening image with Imagine gives 'An image could not be created from the given input'

I'm using Imagine to resize images after uploading them with curl in /tmp: $_imagine = new \Imagine\Gd\Imagine(); $mode = \Imagine\Image\ImageInterface::THUMBNAIL_INSET; $image = $_imagine->open($path); // i.e $path = '/tmp/photo.jpg' // then…
AbdelHady
  • 9,334
  • 8
  • 56
  • 83
1
vote
3 answers

Perl install GD module with cpan

Here is the log file when I tried to install CD by command sudo cpanm GD: cpanm (App::cpanminus) 1.6922 on perl 5.012003 built for darwin-thread-multi-2level Work directory is /Users/Gizak/.cpanm/work/1372838444.1200 You have make /usr/bin/make You…
Gizak
  • 854
  • 2
  • 11
  • 21
1
vote
0 answers

Turn off deflate for PHP outputted image

I am using a controller in CodeIgniter 2 to generate a resized image based on its URL however the pictures are getting randomly cut off on one of our servers (only the top two thirds or so get shown). I believe the problem is related to GZIP being…
1
vote
2 answers

PHP GD calculate size

How to calculate the size of a resized image file without resizing (based on the parameters width, height and dpi)? Example: I have image resolution is 6158x4190, dpi = 300, size = 13.2 MB. So when resized = 2939x2000, dpi = 150, the size is how…
hell boy
  • 11
  • 3
1
vote
0 answers

PHP GD white not always white with imagecolorat

I'm making a script to check if any image is covered in a single color. My idea is resizing the image to 1% of it's size and then walk through every pixel untill the script finds a pixel which is another color then the first one. If it finds such a…
ev8
  • 83
  • 9
1
vote
2 answers

PHP - Save watermarked image to directory

Hi there I'm using the following script, and it works perfectly. My problem is, how do I replace the original image with the watermarked one leaving the same filename and extension? $stamp =…
itsme
  • 48,972
  • 96
  • 224
  • 345
1
vote
1 answer

Read raw color data from PHP's .gd or .gd2 format?

In another question I saw some source, that would export an image into .gd or .gd2 format and then read raw pixel color data from the generated source. Is this possible? Where can I find more information about these formats, or any other, that…
Tony Bogdanov
  • 7,436
  • 10
  • 49
  • 80
1
vote
0 answers

gd2 not showing in phpinfo, is showing in php -i

I'm trying to get the gd2 extension to work on a WAMP stack (Win7(x64), Apache 2.4, PHP 5.3.26) I've enabled extension=php_gd2.dll in php.ini and restarted Apache. I believe my extension directory is reachable as I'm able to load other extensions…
nao
  • 46
  • 1
  • 5
1
vote
0 answers

PHP::GD -> imagepng() don't save the file

I got trouble by using GD Imagepng() on my server. My code work well on my local computer, create the file correctly, save it correctly, but not on my server. I looked lot of posts and try lot of things without success. All GD Elements are enabled.…
1
vote
2 answers

PHP GD Triangle Image Crop

I've noticed there's a few scripts about to try and do this, however none quite fi tmy situation. I've scraped together a few scripts I found to try and come up with the correct solution. However I've come across 2 problems now. The image isn't…
owenmelbz
  • 6,180
  • 16
  • 63
  • 113
1
vote
0 answers

better to resize before or after layering in GD?

I'm layering a number of png images using GD in PHP and then outputting a smaller version. Which is more efficient, to imagecopy all of the layers and then imagecopyresampled the composite image onto a blank image of the desired size, or to start by…
Mala
  • 14,178
  • 25
  • 88
  • 119
1 2 3
99
100