(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
05-31-24 08:31 PM
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: 6529 days
Last view: 6529 days
Posted on 11-20-05 02:34 PM Link | Quote
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: 6524 days
Last view: 6524 days
Posted on 11-20-05 04:16 PM Link | Quote
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: 6529 days
Last view: 6529 days
Posted on 11-20-05 04:43 PM Link | Quote
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: 6710 days
Last view: 6341 days
Posted on 11-21-05 02:03 AM Link | Quote
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: 6529 days
Last view: 6529 days
Posted on 11-21-05 12:06 PM Link | Quote
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: 6710 days
Last view: 6341 days
Posted on 11-21-05 04:42 PM Link | Quote
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: 6529 days
Last view: 6529 days
Posted on 11-22-05 03:51 PM Link | Quote
hey, thanks alot that really helps.
Elric

Octoballoon


 





Since: 11-18-05
From: Melniboné

Last post: 6710 days
Last view: 6341 days
Posted on 11-22-05 10:18 PM Link | Quote
You're welcome. I'm guessing you're planning to use it for your battle thinger?
dcahrakos

490


 





Since: 11-17-05

Last post: 6529 days
Last view: 6529 days
Posted on 11-23-05 10:57 AM Link | Quote
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 |


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.011 seconds; used 384.48 kB (max 467.29 kB)