Software, your way.
How To Get Good Custom Software
(Download)
(PDF)
burger menu icon
WillMaster

WillMaster > LibraryWeb Page and Site Features

FREE! Coding tips, tricks, and treasures.

Possibilities weekly ezine

Get the weekly email website developers read:

 

Your email address

name@example.com
YES! Send Possibilities every week!

Imprinting an Image

PHP can be used to overlay text on an image. The text becomes part of the image and can be saved to your hard-drive and used as any other image.

The PHP script provided with this article is the vehicle that will allow you (or your website visitors, if you make it publicly available) to apply custom text to an image. The PHP script is named Imprint Image.

The number of font choices is limited only by how many you make available. (Instructions with software download.)

The size of the image imprint text and the position of the text on the image can be specified. The text color, too.

It's all possible with the GD image processing module, enabled with most domains' PHP installations.

If you are unsure whether or not your PHP has GD image processing enabled, your hosting company can be asked or, if you prefer to find out on your own, do it this way:

  1. Create a temporary page named testing.php that contains this one line:

    <?php phpinfo(); ?>
  2. Upload testing.php to your sever and type its URL into your browser. You'll get a page with a lot of information about your PHP installation.

  3. On that page, find the section that appears similar to the image below. The arrows and ellipses indicate what parts of GD need to be enabled.

GD section

In the unlikely event GD is not enabled, ask your hosting company to enable GD with GIF, PNG, and JPG support for your PHP installation.

Give Imprint Image a run at the example installation.

If you like it, click here to download a copy.

Imprint Image Installation Instructions

The download package contains ImprintImage.php and 3 TrueType font files (.ttf). You'll need to provide a non-animated image (.gif, .png, .jpg, or .jpeg, any size) for the installation.

The download package also contains file readme.html with information about troubleshooting and how to add fonts and other customization notes.

Here are the installation steps.

  1. Open file ImprintImage.php in a plain text processor. Find the Configuration section line starting with
    $ImageFile =
    and put the image file name between the quotation marks.

    If you wish, other variables in the Configuration section may be customized. And the form may be customized. However, all that is optional. See the readme.html page that came with the download package.

  2. Create a new directory on your server.

  3. Upload the PHP script, the 3 font files, and the image into the new directory.

  4. In the new directory, create a subdirectory named "temp".

  5. Type the URL of ImprintImage.php into your browser.

Imprint Image

The software download package includes troubleshooting, configuration, and customization notes. The notes include instructions for adding fonts and changing the list of available colors.

Imprint Image may be installed on your server for private or public use.

Will Bontrager

Was this article helpful to you?
(anonymous form)

Support This Website

Some of our support is from people like you who see the value of all that's offered for FREE at this website.

"Yes, let me contribute."

Amount (USD):

Tap to Choose
Contribution
Method

All information in WillMaster Library articles is presented AS-IS.

We only suggest and recommend what we believe is of value. As remuneration for the time and research involved to provide quality links, we generally use affiliate links when we can. Whenever we link to something not our own, you should assume they are affiliate links or that we benefit in some way.

How Can We Help You? balloons
How Can We Help You?
bullet Custom Programming
bullet Ready-Made Software
bullet Technical Support
bullet Possibilities Newsletter
bullet Website "How-To" Info
bullet Useful Information List

© 1998-2001 William and Mari Bontrager
© 2001-2011 Bontrager Connection, LLC
© 2011-2024 Will Bontrager Software LLC