PHP Classes
Icontem

File: sample.php


  Search   All class groups All class groups   Latest entries Latest entries   Top 10 charts Top 10 charts   Newsletter Newsletter   Blog Blog   Forums Forums   Help FAQ Help FAQ  
  Login   Register  
Recommend this page to a friend! ReTweet ReTweet Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Reza Salehi  >  insert_text_to_image  >  sample.php  
File: sample.php
Role: Example script
Content type: text/plain
Description: sample.php
Class: insert_text_to_image
Inserts a text into JPEG image.
 

Contents

Class file image Download
<?php

/////////////////////////////////////////////
//---- this class gets a jpeg file and places a string in desired place of 
//---- that image. font and color of this text can be determind as input parameters.
/////////////////////////////////////////////

    
include("insert_text_to_image.class.php");
    
    
$imagename="test.jpg";// place a jpeg file in classes directory and enter its name here.
    
$string="This text was added to this image dynamicaly!";
    
$colorr=255;
    
$colorg=255;
    
$colorb=255;
    
$x_pos=100;
    
$y_pos=150;
    
$font=4;// for font enter a number between 1 to 5.
    
    //---- insert_text_to_image(image file addess ans name, the text which must be placed in image, x of text place
    //----                , y of text place, text color (r), text color (g), text color (b), text font "a numbe between 1 to 5" )
    
    
$ins=new insert_text_to_image($imagename$string$x_pos$y_pos$colorr$colorg$colorb$font);
    
$ins->insert();
?>

 
  Advertise on this site Advertise on this site   Site map Site map   Statistics Statistics   Site tips Site tips   Privacy policy Privacy policy   Contact Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2009 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products