![]() |
| Register | Login | |||||
|
Main
| Memberlist
| Active users
| Calendar
| Chat
| Online users Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album |
|
| | |||
| 0 users currently in Programming. |
| Acmlm's Board - I3 Archive - Programming - GD help |
New poll | | ![]() |
| Add to favorites | Next newer thread | Next older thread |
| User | Post | ||
dcahrakos![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 490 Since: 11-17-05 Last post: 6124 days Last view: 6124 days |
| ||
| Does anyone know how to make a < br > turn into a line break when using it in a generated image? im trying to get this text thing working, but it doesnt want to make
or anything into a line break. (edited by dcahrakos on 11-20-05 01:34 PM) (edited by dcahrakos on 11-20-05 03:44 PM) |
|||
Arthus![]() ![]() ![]() ![]() ![]() ![]() 140 Since: 11-17-05 From: Australia Last post: 6119 days Last view: 6119 days |
| ||
| instead of using < br /> try using \n or \r\n. I tihnk thats the absolute raw code for a break. | |||
dcahrakos![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 490 Since: 11-17-05 Last post: 6124 days Last view: 6124 days |
| ||
| nope, GD when it generates images, doesnt want to add any line breaks to anything, no matter what...oh well, I guess ill just add a bunch of other things to it, and use it for 1 line stuff.
|
|||
Elric![]() Octoballoon Since: 11-18-05 From: Melniboné Last post: 6305 days Last view: 5936 days |
| ||
Have you tried to parse the text into a variable, then use explode() on it?
I know it's possible. I've seen it done. Just dunno how to do it... |
|||
dcahrakos![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 490 Since: 11-17-05 Last post: 6124 days Last view: 6124 days |
| ||
| I asked a couple people, and one person said in short, it wasnt possible, but in a long way, yes, and this is the code he gave me...
$lines = explode("\n", $_GET['text']); foreach ($lines as $line => $val) { imagettftext($image, $size, $angle, $x, (($y + $size) * ($line + 1)), $colour, $fontfile, $val); } |
|||
Elric![]() Octoballoon Since: 11-18-05 From: Melniboné Last post: 6305 days Last view: 5936 days |
| ||
| There. I just spent, like, an hour digging through my cache, looking for this: dynamically add multiline text to images, using GD Options
Hope that helps. |
|||
dcahrakos![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 490 Since: 11-17-05 Last post: 6124 days Last view: 6124 days |
| ||
hey, thanks alot that really helps. |
|||
Elric![]() Octoballoon Since: 11-18-05 From: Melniboné Last post: 6305 days Last view: 5936 days |
| ||
You're welcome. I'm guessing you're planning to use it for your battle thinger? ![]() |
|||
dcahrakos![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 490 Since: 11-17-05 Last post: 6124 days Last view: 6124 days |
| ||
| yep, that and a couple other areas that would benefit from it |
| Add to favorites | Next newer thread | Next older thread |
| Acmlm's Board - I3 Archive - Programming - GD help |
| ![]() |