Home arrow PHP arrow Create Picture IDs with Name Tags Using PHP

Create Picture IDs with Name Tags Using PHP

PHP can be used to write text to images or even merge a source image to a target image. With this concept, it is possible to create open source ID creation software. The ID can contain a picture of a person and a name tag written in text (or even include an ID number). Keep reading to learn how this can be done.

TABLE OF CONTENTS:
  1. Create Picture IDs with Name Tags Using PHP
  2. PHP Script to Write Text and Merge Images
  3. Demo Project Implementation
By: Codex-M
Rating: starstarstarstarstar / 6
July 13, 2010

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

To develop and use this application, you will need to have the following:

An ID image template - This will contain a company logo and the text input fields.  See sample screen shot below:

The picture of the person can be inserted/merged into the spacious area at the right of the image ID template.

To create this template, you can use MS Powerpoint or any image editor, such as in this example: http://www.php-developer.org/wp-content/uploads/tutorials/idtemplate.ppt

You'll need to take a screen shot and crop/cut it to the following specifications:

  • Pixel dimensions: 1015 x 642 pixels
  • Print size: 85.94 x 54.36 millimeters
  • Resolution: 300 x 300 ppi
  • Color Space: RGB Color
  • File type: PNG
  • Filename: idtemplate.png

ID Picture of the person - You can use a colored ID picture. The specifications are as follows:

  • Pixel dimensions: 260 x 300 pixels
  • Print size: 22.01 x 25.40 millimeters
  • Resolution: 300 x 300 ppi
  • Color Space: RGB Color
  • Filename: personid.png

Font type file for the text - This should be a .TTF file. There are lots of websites that allow you to download fonts, such as http://www.webpagepublicity.com/free-fonts.html

You need to create a folder named "opensourceidcreator" and place the following files inside this folder:

a. font file example ambient.ttf

b. idtemplate.png

c. personid.png

d. index.php (a blank .php file to be edited and discussed in the next section)



 
 
>>> More PHP Articles          >>> More By Codex-M
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: