GD

Simple Image Resize Calculator Function

Posted on January 8, 2009. Filed under: GD, PHP |

Here is a simple function to calculate the width and height of an image given the constraints you want the image to fit in. This is great for creating thumbnails which need to fit into a specific height / width.
To call the function, pass in the current height / width of the image you’d like [...]

Read Full Post | Make a Comment ( None so far )

Creating Pixelated / Mosaic images with GD in PHP

Posted on January 1, 2008. Filed under: GD, PHP | Tags: , , , , |

A simple way to create a pixelated [or mosaic-looking] image in PHP using GD is to, in theory:

Create a image resource for the soon-to-be-pixelated image
Resize the image to 5% of it’s original size [adjust to taste]
Save image to server or send to browser

Using the script below will turn the image on the left into the [...]

Read Full Post | Make a Comment ( None so far )

Liked it here?
Why not try sites on the blogroll...