Welcome to WebmasterWorld Guest from 54.162.168.187

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Dynamic Image Creation...

Stroke / Bold text?

     
6:59 am on Jan 23, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 4, 2004
posts:59
votes: 0


I'm new to the whole dynamic images thing.. I've picked up on a few simple commands so far, I can take an image apply simple writing on it and develop a new image from it using GD.

Here is the code so far:

<?php
$image = imagecreatefrompng("text_background.png");
$font_size = 7;
$color = imagecolorallocate($image, 255,255,255);
$black = imagecolorallocate($image, 0,0,0);
$text = "Test!";
$font = "TT0768M_.TTF";

ImageTTFText ($image, $font_size, 0, 4, 10, $black, $font, $text);

ImageTTFText ($image, $font_size, 0, 5, 10, $color, $font, $text);

header("Content-type: image/png");
imagepng($image);
imagedestroy($image);
?>

Much I just picked up from some tutorials, so again I don't know too much.

What I want to do is create images using a unique font with a pre-made background image that have bold and stroke attributes.

Here is what I'm attempting to replicate automaticly instead of make a dozens manually :
5.25 KB, 60px by 16px.

[edited by: jatar_k at 5:31 pm (utc) on Jan. 23, 2005]

1:18 am on Jan 26, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 4, 2004
posts:59
votes: 0


Due to conditions outside of my control this topic was not viewable for a period of time after its creation, hence forth nobody seen it. I'm bumping this topic (but once) in hope someone can view and respond.
6:30 pm on Jan 26, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 19, 2003
posts:1001
votes: 0


bold: using imagettftext(), you'll have to have a bold font. Some programs like browsers are able to emulate a bold font with a normal font when there's no bold font available, but imagettftext won't be able to do that for you. Stroke: you mean strikethrough? you might have to do this 'manually' with imageline().
10:37 pm on Jan 27, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 4, 2004
posts:59
votes: 0


//Stroke: you mean strikethrough?

No, Stroke is when there is a outline or border color around the text.

I have been able to duplicate it by first setting down the text offset in each direction. Then using the main color in the center.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members