Creating images on the fly can be a very useful skill. In this tutorial we will show you how to get quite interesting and useful effects using image handling functions. We will review two practical tasks: creating security images (captcha) on the fly and building a bar chart using numerical values retrieved from MySQL database.
Version: n/a Platform(s): n/a Updated: Mon Nov 20 2006
Worried about bots? Then create CAPTCHA images to prevent bots from taking advantage of your site. You may be wondering what a CAPTCHA image is. Here's a brief synopsis from Wikipedia:
A captcha (an acronym for "completely automated public Turing test to tell computers and humans apart") is a type of challenge-response test used in computing to determine whether or not the user is human. Captchas are used to prevent bots from using various types of computing services. Applications include preventing bots from taking part in online polls, registering for free email accounts (which may then be used to send spam), and, more recently, preventing bot-generated spam by requiring that the (unrecognized) sender pass a captcha test before the email message is delivered.
Version: n/a Platform(s): linux, windows, freebsd, osx, sun Updated: Thu Jan 12 2006
This tutorial focuses on a thumbnail generation script. Rather than generating a smaller representation of the image, it cuts out a section of the photograph to create an obscure snapshot of the photo itself. The thumbnail's size is variable also, so the script be used across different sites to create different sized thumbnails where needed.
Version: n/a Platform(s): n/a Updated: Wed Jan 4 2006
This tutorial demonstrates how to place one image over another image... handy stuff for applying a signature or logo to a photo, adding a "watermark," or whatever else you might imagine useful.
Depending upon how it's done, displaying a page of thumbnail images can be very cumbersome. Allowing the browser to resize images requires the client browser to download the entire, full-size image, then clumsily resize the image to a specified size. This causes the page to load very slowly and creates unavoidable distortion in the resulting images. The other option is to make separate thumbnail images for each individual image. This is fine if you only plan to display a few images, but becomes unrealistic on a large scale or a site involving dynamic images. Fortunately there are ways around these problems using the GD library in PHP.
A brief introduction to the world of image manipulation in PHP using the GD library. This tutorial will guide you through creating a clock that will display the current time.
Create dynamic images with the GD library. Tutorial shows you how to create a little man holding a sign that displays various messages (such a visitor's IP address and user-inputted text).
Version: n/a Platform(s): linux, windows, freebsd, osx, sun Updated: Thu Jan 20 2005
the goal of this tutorial is to give the reader an idea of how to construct a basic/dynamic image gallery from start to finish, not to imply that this is the only way, or even the best way to build a gallery; just a simple approach without all the bells and whistles. at the time of writing, this tutorial assumes a version of PHP >= 4.3 and GD 2.
Version: n/a Platform(s): n/a Updated: Mon Oct 27 2003
This article explains how you use PHP and the gd image library to generate preview pictures (thumbnails) from big images. For single images and whole folders. It explains the logic of the resizing algorithm and introduces some custom functions to use.
This is a comprehensive tutorial on how the graphics capabilities of PHP can be used to create simple bar charts in GIF and PNG format. Each example includes a graphical chart along with source code.
Version: n/a Platform(s): n/a Updated: Thu Dec 21 2000
This setp-by-step article explains how to create a database-driven image uploading and display system in PHP. The example database used being MySQL, it also discusses possible modifications for MS SQL and Oracle. Some of the main topics include: Create database table with a field defined to hold binary data, Get your binary data into your table through a form-based file upload script, and Retrieve your binary data and display it to the user.
Version: n/a Platform(s): n/a Updated: Wed Nov 8 2000