gd

image merging using php in GD

hi i want to merge to images but the problem is one image is .PNG format and second one is .JPG format and after merging the output should be .PNG format but the transparency is not appearing .plz help Thanks ...

Resize images too large for GD Library on my server

I almost always have a PHP resize script (using GD) in websites for my clients. No matter how many times I tell them to resize their huge 7MP images from their digital camera before uploading them, they still never do it. The result is an "Out Of Memory" error from the server, and the image doesn't get resized, because the original ima...

trying to crop and upload an image to a folder.

i used to do this by uploading the image to the database but later learned its the wrong way because when you try to export the database if ur moving it from localhost to the server the images dont come along :( so anywho, the script i have here is to get the image , crop it, give it a random name and drop it into the gallery folder. but...

Best way to process images on server?

I know there is a lot of discussion over GD or ImageMagick for a LAMP setup. I can't seem to get a solid answer on the best one though so I will explain my specific needs and maybe someone can help. I will be using on a social networking site where users uploads photos to there image gallery. All I need it to do is upload the file and...

include image in generated GD image

Is it possible to include an external image (gif, jpg or png) into a GD generated image? what I'm trying to do is get the latest wordpress blog post (like 5) and generate an image from it. I would like to include the title and the image uploaded with the blog post. ...

Bad quality of GIF image in PHP GD

I have a watermark script I am working on, the results are good on PNG and on JPG images however a gif image, not so good. I am using PHP and GD Below you can see the difference in quality of the watermark. Anyone know how to improve this? For the gif version I am using $image = imagecreatefromgif($source_file); imagecopymerge($imag...

export arabic text as images

Hello, I have a bunch of lines of Arabic text in UTF-8. The device I am trying to display this one does not support arabic text being displayed. Therefore, I need to convert the text into images. I would like to save each line of text as an image with a specific width. I need to use a specific font as well. What is the best way to ...

Have GD get image from binary string

Hey everyone, Right now, I have a database that stores images in a MySQL BLOB field. I setup a script that selects and displays the images based on an ID in the URL, and I also made it so if you append ?resize=800x600, it would resize the image (in this case, to 800x600). For some dumb reason, the host that I use doesn't have Imagemagi...

PHP creates image file but only works on local dev, not at the remote server

I have a code that dinamically resizes an image and sends it to the browser. But it doesn't work properly... only if I ask it to output the image to a file instead of the browser. I don't think the problem is my code, because this problem only occurs on the real server; in my computer its working perfectly. Code: $img = $_GET['img'];...

PHP GD - Crop Shape

I want to crop images using the GD, but I want it to crop around a particular shape rather than just a square. Is this possible? ...

PHP GD gives error

Update: TTF file seems to be there after testing. Update: changed to a relative path for the font file. Still doesn't work. I get the following error when I try to make an image using GD through PHP. [Tue Sep 01 19:44:15 2009] [error] [client IP ADDRESS] PHP Warning: imagettftext() [function.imagettftext]: Could not find/o...

script for cropping images

Hi! I have many (about 1000) images (printscreens), and I need to crop these images (all cropped images are in the same region in the full image). How can I do this in php? Or maybe GIMP is supporting some macro scripts to do this? Thanks in advance. ...

Image GD resize to 100px while keep the ratio

Hay Guys. I was wondering if anyone can help with resizing an image to 100px (wide, or high). While keep it's ratio and quality. All this needs to do is open a given file, resize it and overwrite the file with the new version (keeping the filename). It should only beable to do jpegs,gifs and pngs. I'm not fussed about transparencies...

PHP Function to bend/warp an image.

I'm working with my simple PHP captcha algorithm (http://www.source.ofitall.com/devel/captcha.php) and I have been struggling to try and adjust it to be the more attractive and easier to read, Google style captcha. Does anyone know of a function that will take in a GD image reference and bend/warp it, Google style? ...

Combine 2-3 transparent PNG images on top of each other with PHP

I am working on a custom avatar system for a project, but I have never really done much with the image side of PHP. I assume I need to use GD in some way, but I have no idea where to even start. Basically, there are a bunch of pre-made transparent PNG images. Users can select 2-3 of them to customize their avatar, and I want to be abl...

Automatically align and resize 3 images into a small image with PHP?

I don't know if this is even possible with PHP, but I figured if it is, someone here will know how. I'm currently working on a project where users can customize a full body main avatar to be used throughout the site. There are a bunch of different face, hair, etc transparent png images that can be selected to make their custom avatar. ...

PHP - loading images in GD

Hello, I have to work with different kinds of images with PHP&&GD. The images have extensions like png,jpg and other. How can i upload them into resources. For example, there is function CreateImageFromJPEG, but I'll not be able to load other types of images. How can I write template for all types I need? ...

ie6 - gd and php image outputting

Hi guys, i'm trying to show image with grayscale-filter. Here is my code: $images = glob('gallery/*small*'); shuffle($images); array_splice($images, 3); $imgHandles = array(); $imgBuffered = array(); for( $i = 0; $i < 3; $i++) { $imgHandles[$i] = imagecreatefromstring( file_get_contents($images[$i]) ); imagefilter( $imgHandles...

Generate image of PHP output

I want to experiment with creating images/thumbnails of PHP output. A place where one would use this is in a CMS with various modules, and then have a thumbnail of how the output of how each module looks. This should include images and all. Any tips/ideas how I would go about doing this? ...

What is the fastest way to do image rotation in PHP without using GD's imagerotate?

I do not have the ability to use PHP's GD imagerotate() function, so I need to find another solution. I used the rotateImage() method found in the comments of the imagerotate() PHP help page, but it is very slow on large images. I am horrible at image math, and am having a hard time formulating the correct Google search to get me pointe...