Background Text Image
How can I place text on a page like a watermark background. For
example, I may want to put FOR SALE in large red letters in the center
of a page at a 10% opacity then write text over it from the initial
point of origin. I've tried using style commands, but the results are
inconsistant.
View Complete Forum Thread with Replies
Related Forum Messages:
Text On A Background Image
it needs to have the background of another image (bg.jpg) and then have text printed on top of it. I have tried jpgraph but it was to hard to understand then i tried this:   <?php         header ("Content-type: image/png");         $img_handle = ImageCreate (230, 20) or die ("Cannot Create image");         $back_color = ImageColorAllocate ($img_handle, 0, 10, 10);         $txt_color = ImageColorAllocate ($img_handle, 233, 114, 191);         ImageString ($img_handle, 31, 5, 5,  "My first Program with GD", $txt_color);         ImagePng ($img_handle);  ?>
View Replies !
Background Image
i created a calendar in php. i have this calendar displayed on another php page (index.php). i added a background image to the calendar. it displays fine on the calendar alone but it won't display as a background image when i display it on index.php.
View Replies !
Random Background Image
I'm designing a site that needs to do the following: Select randomly from a series of about 5 different background images Store the selected image name in a session variable I'm pretty sure that I can setup it's selecting randomly from images and storing it in a session variable. The thing I can't figure out is how I should execute it most efficiently. Will it work to do a php file include of the php file that has the code.
View Replies !
Random Background Image + CSS
I have images stored in a server folder with metadata in Database. The images are to be used as Background Images set in a .CSS file... background: #fff url('../images/main_bg.jpg'); How do I display images by random in the CSS file? Is it possible?
View Replies !
Random Text & Background Colors?
Is there a way to generate colour hex strings that are guaranteed to be dark and thus good as random-generated text colours? something like ------------------- srand((double)microtime()*1000000); function tc() { $frag = range(0,6); $text = "#"; for ($i = 1; $i <= 6; $i++) { $text = $text . $frag[mt_rand(0, count($frag)-1)]; } return $text; } $text = tc(); -------------------- is what I have in mind.... but I really don't know how the hex codes for rgb realte to "darkness" And while I'm on the subject, whats the converse (for pale colours, for backgrounds) look like?
View Replies !
Background Image Load Problem
I have a table with a large background image: <table style='background-image: url(images/eagle_country_large.jpg); ..'> The problem is that everything on the page loads except there is a big delay with the loading of the image. It's not like a regular image loading. Somehow it looks like the page is finished, then a delay, and then the background picture appears. It's even worse on a dialup connection. Code:
View Replies !
Question About Adding A Background Image
I have searched and dug and I have looked at probly every thread on hear and I have still not been able to figure out how to put up a simple background image I have tried a couple things from different threads but when I enter in the code I either get light blue background, no page at all, or the same as what I started with. Here is what I am adding (with many variations) <body style="background: #CCFFFF url('../../images/adrian18.jpg');">' It works fine in my editor (dreamweaverMX) but when I upload it I get nothing. Please treat me like I am Stupid, the reason is because I don't know for sure If I have been editing the right file. the file I have been editing is index.tpl under my /templates/ folder, because it sets my layout, I do also have a index.php in my root folder.
View Replies !
Image Create Default Background Color
I have a script that crops and image and resizes it, but that's not the problem. If the image is smaller than the crop area, PHP just fills it in with black. Is there a way to make PHP fill it in with white instead of black?
View Replies !
Text To Image?
I have a URL that displays a background image and text overlay but I was wanting to know if its possible to combine the two and have it show as a image? Code:
View Replies !
Certain Image/text
I need to write a script that will display a certain image/text depending on what day of the week, and what time of day it is currently. i.e. If Monday between 10am - 2pm display image 'X' and text 'blahblahblah' I need this for 7 different variables. Now I'm really not asking for anyone to write the script for me (I'm not that kind of noob lol), but if someone could point me in the right direction as to which functions to use (I'm pretty comfortable using date("l") for weekday and date("H") for the hour) to match the images/text to the time/date.
View Replies !
Text Within A PNG Image
I have a script which basically puts in 2 words into a PNG image, what I want to do is, center the text horizontally, set the font to Arial, and make the text slightly transparent. here is my script: <?php // variables $testing = "Alpha Testing"; $image = "http://www.crikeygames.com.au/conflictingforces/images/conflicting_forces_header.png";  $im = imagecreatefrompng($image); $wc = ImageColorAllocate ($im, 255, 255, 255);  $red = ImageColorAllocate ($im, 255, 0, 0); ImageString($im, 3, 260, 2, $testing, $wc);  header("Content-Type: image/png");  Imagepng($im,'',100);  ImageDestroy ($im); ?>
View Replies !
Image And Text
I'm trying to put php generated images and text in the same page and it's not working out for me right now. I took the sample code from the php manual for imageellipse() and tried to add an echo statement to the code. Code:
View Replies !
Text To Image
I am curious about text to image encoding I have had a look at phpclasses.org and have managed to download a library and convert some text to an image in png format - this is all working, but what I would really like to do is attempt to code one of these 'glitter text' things. In other words, the user would enter in their name and it would display their name in 'funky colourful' text. I've seen it done all over myspace and facebook, and just wonder how this works or if anyone has some sample code. There is a much bigger picture to this, I don't want to create a silly kids text converter, but I need the understanding before I can evolve.
View Replies !
Image Text Creation
I have an Image for a background I would like to use to place text on for a banner at the top of each page. How can I... a. Put text on this image... b. and make the text have a 3 pixle black border like this..
View Replies !
Adding Image Next To Text
I read and understood the tutorial for "Quick and dirty PHP/MySQL" publishing system. However after trying hard to find a way to add an imageurl next to the text, it just seem to be impossible. It only shows the url next to the written stuff, so I am looking for a string/code which converts the URL to show the image. I have also tried using a BBcode string in the script but it didn't work either. I know it's a simple thing but it has kept me up for 5 days now.
View Replies !
Wrap Text Around Image?
I have a table with a dynamic image and dynamic text field. Whatever i try, the text doesn't wrap around the image. Can someone please help me out with this? this is the code: <td> <img src="fotos/<?php echo $row_Recordset1['foto']; ?>" alt="" name="fotoholder" width="200" height="200"> <?php echo nl2br( htmlspecialchars( $row_Recordset1['tekst'])); ?> </td>
View Replies !
Image And Text: How To See The Difference
Depending on if I get an image or a text of a certain URL, I want to do something different. I don't know in advance whether I'll get an image or a text. This is a URL that returns an image: http://indicator.amessage.info/indi...amp;param4=.png This is one that returns text: http://indicator.amessage.info/indi...amp;param4=.png How could I see the difference between the 2 with PHP code?
View Replies !
Text On Image Generation
I was wonder how I have a text box, you type in your name and it prints in on a image so lets say Ive got a template at "/template.png" and I want to get my name on it "iNinja" so i would like a PHP web application to have a text box, you type in iNinja and click the submit button and it saves the newly created image as "/image1.png" (if thats taken then "/image2.png" and so on...)
View Replies !
Image Text Modifications
I need to make two modifications, 1. For it to use georgia.ttf (which I have uploaded) as the TTF font of the text. 2. For the text to be antialiased (smooth) Code:
View Replies !
Align Text In GD Image
I have modified a captcha plugin. I use imagestring, imagettftext and imagefttext to display text in an image. The problem is that the text is like a sin wave and the angle is set to 0.0. Wolud Postscript work?
View Replies !
Display Text Along With The Image
I am doing some work on one php page that is generating an array. Then I need to pass that array to a second page that then uses the info from that array to output an image. However I would like to display text along with the image, so someone told me I needed to include the following line in the page with the outputted text: <img src="image.php/id=$imagenr">. But if I do that, how do I pass the variables to image.php?
View Replies !
Replacing Text With An Image
i am trying to write a script that will allow me to replace text with a image. I have a listings page and when a user performs a search i would like any instance of "yes" to be replaced by a checkmark image, and any "no" with a x image.
View Replies !
Text In Entre Of Image
i have the following code to write text on an image $myImage = imagecreatefromjpeg('certificate.jpg'); $black=imagecolorallocate($myImage, 0, 0 ,0); imagefttext($myImage, 16, 0, 250, 140, $black, "arialbd.ttf",$_REQUEST['cname']); imagefttext($myImage, 12, 0, 290, 160, $black, "arialbd.ttf","STATE"); imagefttext($myImage, 12, 0, 300, 180, $black, "arialbd.ttf","COUNTRY"); header("Content-type: image/jpeg"); imagejpeg($myImage); but if the name is say, charlie it will become in the middle of the image but if the name is long like Angelina Jolie it starts at the fixed width and height and is pushed towards the right side of the image
View Replies !
GD Center Text On A Image
The following works fine - but would like to center the text. Whats the best way to do it ? . <?php $text=$kk[4]; if ($kk[4]=="") {$text="MAIN MENU"; $kk[1]="mainmenu";} $img_name="images/zdefault.jpg"; $source=ImageCreateFromJPEG($img_name); $white=imagecolorallocate($source,255,255,255); $grey=imagecolorallocate($source,213,224,225); $black=imagecolorallocate($source,0,0,0); $font='arial.ttf' imagettftext($source,28,0,12,39,$grey, $font, $text); ...................
View Replies !
Text Above Header Image
Why is the text in this script (Frequently Asked Questions) show ABOVE the header image, and not inbetween the header and footer image. PHP Code: <?php session_start(); session_register("sess_name"); session_register("sess_passwd"); session_register("sess_data"); include("vars.php"); include("headfoot.php"); mysql_connect($db_host, $db_user, $db_pwd); mysql_select_db($db_name); $res = mysql_query("select * from faq order by id asc"); uheader(); if ($_SESSION['sess_name'] != "" && $_SESSION['sess_passwd'] != "") { members_main_menu($members_menu); ..............
View Replies !
Distortion Of Text Over Image
I m creating a business card using GD. When I write text on a blank png image, It works fine for ttf fonts... Now I want to add a logo on that image. I use imagecopymerge() for this. But Now when i m trying to write text on created image - text is distorted....
View Replies !
JPEG Image With Text
can someone look at this and point me in the right direction, never done this GD library stuff: <?php header("Content-type: image/jpg"); $TableNumber=$_GET['TableNumber']; $imjpg = imagecreatefromjpeg("/images/rmsnotext.jpg"); $TableNumber_color = ImageColorAllocate ($imjpg, 213, 43, 43); $px = (imagesx($imjpg)-7.5*strlen($TableNumber))/2; ImageString($imjpg,3,$px,9,$TableNumber,$TableNumber_color); ImageJpeg($imjpg); ImageDestroy($imjpg); ?> This code is not working, do I really need the "ImageDestroy($imjpg);".
View Replies !
GD Resize And Add Text At The Top Of Image
How can you take an image with PHP on your webspace and then edit it such as resizing it and such. Like, what are the functions used. Also, in GD, can you take an image add text on top of it, and then create a new image with it that can be saved and what not.
View Replies !
Transparent Text On Image?
Is it possible to place transparent text on an image? I want to display an image of some text in a fancy typeface, but superimpose text in a plain style, so that it can be copied and pasted; a bit like what you see in some PDF files, where the page image is visiable, the overlying text is not.
View Replies !
Convert Image To Text
I am interested in developing an online utility that will enable users to copy and past any image (or upload any image on the internet) to the online utility, which will then convert the image to text. The user may "convert image to text" and copy and paste the text displayed into any word document, or send the text displayed to the recipient's email address or can download the text file as a zipped text file that will be presented to the user as a small zipped text file icon. Code:
View Replies !
Text Watermark On Image Reg.
Im trying to use text watermark on images using GD functions. I went through a couple of watermarking threads here, but those were mostly like watermarking images on another image. And only one instance of watermarking is done. I'd like to use text for watermarking. I can set the size & transparency of the text & write to the image directly. Im thinking of using imagettftext function. But this doesnt have transparency as parameter. Any other function would do that? Or is it better to convert text to image & then watermark it using transparency? Code:
View Replies !
Text Wrapping In A PNG Image,
I am lost, I want to display posts in an image, but i can't find a way to text wrap, Lets say this is my image Code: ------------------------------- | | | | | | ------------------------------- I want to wrap my text around like this ------------------------------- | ------------------------ | | | text here | | | it even wraps | ------------------------------- Basicly, how in the world do i do this, I am new to PHP, basicly all i know is forms MYSQL, and how to have it do some math, images are entirly new to me, thanks. For the help, if it is possible, can someone show me a working script, that does something simular to what i want.
View Replies !
Outputting Image And Text
I know that once you change the header to output an image in php, you can't output text. But I need to do this. Does anyone know of a workaround to getting an image and text outputted to the same page?
View Replies !
Image Resizing And Text Output
I'm writing a thumbnail script which reads all directories , sorts them by their title (the directory title is a date) , then lists their dates and their resized images. I'm using this in my loop to resize each picture:
View Replies !
Image Text Generation Question
Howdy, I was wondering if anyone knows a way to put like a drop shadow or bevel on text that php generates. I am framiliar with the GD library but I dont think there is any function in it to make extra things on the text.
View Replies !
Changing An Image For Text/hyperlink
I have the following piece of code, which uses an image as a button. I want to remove the image and just have some text/hyperlink which has the same effect when clicked? Would someone please help and advise what needs to be changed... <?php echo tep_image_submit('button_wishlist.gif', 'Add to Wishlist', 'name="wishlist" value="wishlist"');?> ....
View Replies !
Image Generation Text Messup
I'm working with generating text on images with an image generation code. I use a gif background with some transparency, and on some images, the text, instead of being the color I allocate, it is black and choppy.
View Replies !
File Not Writing Text To Image.
I have a script that should write text into a rectangle that is generated by php. Here is what I really get with the below script. Image and the image I used to create it with First Image and below is the code that I used, but as you can see the first link that resulted from the script has nothing in the little rectangle produced by the script. Code:
View Replies !
|