I have a server which holds TIFF images. Most clients can read and display TIFF images, so there’s no problem. However, some clients can’t handle this format but can handle JPG. I thought of using PHP’…
Tag: gd
Copy an image and preserve its EXIF/IPTC data with PHP imageCreateFromJpeg?
I having some problems with an image that has EXIF/IPTC data stored in it. When I use imageCreateFromJpeg (to rotate/crop or etc) the newly stored file doesn’t preserve the EXIF/IPTC data. My current code looks like this: Am I doing something wrong? Answer You aren’t doing anything wrong, but GD doesn’t deal with Exif of IPTC data at all as
PHP GD Library output an image and text content on same page
I am trying to output an image to a browser and then output HTML (not directly related to the image) on the same page. Is this possible? I am having a heck of a time figuring it out. Here is my code I …
How do I install GD on my windows server version of PHP
I am running Windows Server 2003 and need to install a version of GD. Can anyone point out some instructions or advice? Answer Check php_gd2.dll is in your extension directory and uncomment ;extension=php_gd2.dll of your php.ini.
Converting BMP to JPG in PHP
In a site I’m developing I need to be able to pass all my images through imagejpeg(), so I decided (as my site only accepts JPG, BMP + PNG uploads) to simply convert BMPs and PNGs to a JPG first. Now to convert the BMP I used the script found here: http://forums.codewalkers.com/php-coding-7/how-to-convert-bmp-to-jpg-879135.html The script works fine when I pass a
Way to verify if variable is a valid GD image resource?
I have a class that accepts a GD image resource as one of its arguments. As far as I know, there is no way to type hint this since it is a resource and not an object. Is there a way to validate …
Resize PNG image in PHP
I’m getting a no image display when resizing PNG however the following code works for JPEG. I’ve put the headers in but for some reason I’m doing something wrong for png images. Answer Last argument in imagepng($image_p, null, 100) should be between 0 and 9.
can I have multiline text with GD and PHP?
I’m trying to output multiline text with GD+PHP but can’t get it working. my php knowledge is really basic. here’s the code, any idea on how to output 2 or 3 lines of text? $theText = (isset($_GET[‘…
How to create transparent watermark on an image using gdlibrary? [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago. Improve this question How to create transparent watermark on an image using gd library? I want to rotate the image and tile it through out entire image also.
imagecreatefrompng() Makes a black background instead of transparent?
I make thumbnails using PHP and GD library but my code turn png transparency into a solid black color, Is there a solution to improve my code? this is my php thumbnail maker code: Thank you Answer After imagecreatetruecolor():