Micro Niche Builder
Closed Thread
Results 1 to 4 of 4

Thread: Adding text to image help please

  1. #1

    Default Adding text to image help please

    Hi

    Im trying to add text to an image in paint shop pro,

    now i can add the text fine but the text itself when applied to the image is transparent, what am i doing wrong?


  2. Micro Niche Builder

  3. #2

    Default

    Hi,

    Check your image extensions before saving them, there may be some problem. Kindly save it in bmp, jpg format or add a background layer on image’s master file. For more help with professional designers, visit Servana.com (my signature).

  4. #3
    Banned For Life! JomtienCafe is infamous around these parts JomtienCafe is infamous around these parts JomtienCafe is infamous around these parts JomtienCafe is infamous around these parts JomtienCafe is infamous around these parts JomtienCafe is infamous around these parts JomtienCafe is infamous around these parts JomtienCafe is infamous around these parts
    Join Date
    Apr 2009
    Location
    Pattaya and Jomtien
    Posts
    136
    Thanks
    3
    Thanked 11 Times in 10 Posts

    Default

    Choose a color before adding your text....................

  5. #4

    Default

    hello,
    We will need two files. The first file will create the validation image and incorporate the image in a validation form. Here is the step-by-step code for the first file: verify.php

    ---BEGINNING OF FILE: VERIFY.PHP---

    < ?php

    // Create an image where width=200 pixels and height=40 pixels

    $val_img = imagecreate(200, 40);

    // Allocate 2 colors to the image

    $white = imagecolorallocate($val_img, 255, 255, 255);

    $black = imagecolorallocate($val_img, 0, 0, 0);

    // Create a seed to generate a random number

    srand((double)microtime()*1000000);

    // Run the random number seed through the MD5 function

    $seed_string = md5(rand(0,9999));

    // Chop the random string down to 5 characters

    // This is the validation code we will use

    $val_string = substr($seed_string, 17, 5);

    // Set the background of the image to black

    imagefill($val_img, 0, 0, $black);

    // Print the validation code on the image in white

    imagestring($val_img, 4, 96, 19, $val_string, $white);

    // Write the image file to the current directory

    imagejpeg($val_img, "verify.jpg");

    imagedestroy($val_img);

    ? >

    < !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

    "http://www.w3.org/TR/html4/loose.dtd" >

    < html >

    < head >

    < meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" >

    < title >Image Verification< /title >

    < /head >

    < body >

    < img src="verify.jpg" height="40" width="200" alt="validation image" / >

    < br / >< br / >Type in the validation code from the image. (case sensitive)

    < form action="validateform.php" method="post" >

    < input name="random" type="text" value="" >

    < input type="submit" >

    < !-- The validation code will be posted from a hidden form element -- >

    < input name="validation" type="hidden" value="< ?php echo $val_string ? >" >

    < /form >

    < /body >

    < /html >

    ---END OF FILE: VERIFY.PHP---

    Now we will create a file that will perform the validation using the POST method:

    ---BEGINNING OF FILE: VALIDATEFORM.PHP---

    < ?php

    if ($_POST['validation'] == trim($_POST['random'])){

    echo "You are validated";

    }

    else{

    echo "Please go back and get validated.";

    }

    ? >

    ---END OF FILE: VALIDATEFORM.PHP---

    Thanks.

Closed Thread

Similar Threads

  1. Replies: 0
    Last Post: 09-06-2009, 04:01 PM
  2. Anchor text = Alt Text
    By Handsome in forum Link Development
    Replies: 5
    Last Post: 06-22-2009, 11:45 PM
  3. Adding Blog feature?
    By decipher in forum PromoJunkie Forums
    Replies: 1
    Last Post: 03-27-2009, 08:55 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts