gd

Pulling IMG Into PHP File

I have a PHP file and an image in the same directory. How could I get the PHP file to set it's headers as jpeg and "pull" the image into it. So if I went to file.php it would show the image. If I rewrite file.php to file_created.jpg and it needs to work. ...

How to dynamically create an image with a specified number on it?

I have a place holder image saying something like: Your rating is: [rating here] My PHP code is supposed to dynamically insert the rating number where there is a blank space left out for it on the placeholder image. How can I do that? ...

Can I swap colors in image using GD library in PHP?

Hi, I got the image like this (it's a graph): I want to change the colours, so the white is black, the graph line is light blue, etc.. is it possible to achieve with GD and PHP? ...

Dynamic backgroundimages PHP GD

Hi Stackers, Problem Basicly, it's impossible to use a full-size photograph with the background-image in a proper way imo. Different resolutions, wide-screen etc etc. What im looking for is a JS/PHP GD solution for this problem. Technique From what i hear, it would be as follows. Javascript looks up available screensize (browser window...

reasonable PHP memory_limit for image resize

I want to enable users on my site to upload images to their accounts. The images get resized into 4 different sizes required across the site. I have been using Pear Image_Transform but I kept getting "bytes exhausted" fatal errors on certain types of jpgs (all files tried under 2mb). So I moved to a dedicated server with Pentium Dual-C...

What is the best package for generating dynamic graphs with PHP?

I have a strong need to start implementing database driven graphs on a couple of projects and the only library I have really played with is PEAR's Image_Graph. On the surface this seems fairly limited and like it may not be the best solution. I am going to need to generate both bar/pie charts, nothing overly fancy for the first cut. ...

Displaying images using PHP not working

I'm trying to display an image using a PHP script. Basically so the php script is passed on the full path to the image, and it then displays that image in the browser. I've checked to make sure the image exists, it is being read correctly, etc, however in the browser i just see the broken image box (e.g the small red cross in IE) if I go...

Fatal error: Call to undefined function imagefilter()

Hey All, What is causing this error? Fatal error: Call to undefined function imagefilter() in /var/www/polaroid.php on line 5 1 <?PHP 2 $img_addr = $_GET['image_address']; 3 $img = imagecreatefromjpeg($img_addr); 4 /* everything works as expected without this line */ 5 imagefilter($img, IMG_FILTER_GRAYSCALE); ...

php and true type collection in gd

I try to use a true type collection "gulim.ttc" with 4 fonts in the GD libary. Like this: $font = "fonts/gulim.ttc"; imagettftext($im, 20, 0, 0, 25, $white, $font, $string); The Problem is, PHP/GD only uses the first font from the ttc-file but I need the third one called "Dotum". Or, is there a way to extract or convert the ttc-file...

Compiling PHP-GD on Mac OSX 10.5

I've followed the helpful instructions here: Install GD for PHP on Mac OS X 10.5 Leopard And I have my extension directory in php.ini file like this: extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/" But when I try and load GD, I get an error: PHP Startup: Unable to load dynamic library '/usr/local/php/lib/...

GD2 and PHP on OS X

There are tons of links on this topic - but all have a different approach. I have a clean install of os x 10.5.6. I'm using the version of PHP that came with the OS. I have installed GD using FINK, it has installed associated packages. My question is, how do I now get GD support in PHP? (pref no macports or marc liyanage suggestions as...

Load PNG and read pixels in PHP without GD?

I have a need to read in the exact unaltered pixel data (ARGB) from a truecolour PNG file, preferably from PHP. Unfortunately the GD library in PHP messes with the alpha channel (reducing it from 8-bit to 7-bit), making it unusable. I'm currently assuming that my options are either: Implement my own raw PNG reader to extract the nece...

How can I take a screenshot of a website with PHP and GD?

How can I create a screenshot of a website using PHP and the GD library. ...

Getting imagegrabscreen to work

I'm trying to get imagegrabscreen (a GD function) to work with my Apache/Vista PC. I'm using the following code: <?php $im = imagegrabscreen(); header('Content-type: image/png'); imagepng($im); imagedestroy($im); ?> At the moment I get a solid black image, the size of my secondary monitor (1024*768). I'm using Apache 2.2, runing as ...

imagecreatefromjpeg is silently terminating scripts

Hello there, Like so many before me, I'm writing a PHP script to do some image thumbnailing. The script has earned WOMM (works on my machine) certification, but when I move it to my host (1&1 Basic), there's an issue: images above a certain filesize cannot be processed. I've moved all operations to the filesystem, to be certain it's not...

Outputting image with underlined text using php GD library

What is the best way to display underlined text and output the result as image with GD or any other library? ...

merge images with text

Hello, Is there a way to put text on a png and then merge it wit a jpg / gif image? ...

Colorizing and swapping colors with PHP GD Image Library?

Hello I am in the process of trying to colorize and swap colors on an image using GD image library with PHP. I am using an original image located here: http://korlon.com/youknowbetter/test.jpg And wish to get it to a point where it is orange face with black clothes and hair much like you see here: http://youknowdifferent.org/ So far ...

Why is Perl's GD::Graph complaining about "Invalid data set"?

Hi I am writing a small program in Perl for my assignment and I am new to Perl. Code that I have written provides me with exactly the same values I need, but I am getting this error while creating bar chart. Invalid data set: 0 at line 67 Line 67 is marked with a comment in the code below. The values stored in x-axis are: 40 44 48...

php resize script doesn't work for transparent gif's

How Can I get this working for transparent gif's and png's? function resizeImage($image,$newImage,$target_width,$target_height, $type="") { if (is_file($image)) { if($type == ".gif"){ $image_org=@imagecreatefromgif($image); }else{ $image_org=@imagecreatefromjpeg($image); } if ($image_org) { list($w,$h,$type,$attr) = ge...