What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » overlaying text on image in php

overlaying text on image in php
Author: Message:
Supersonicdarky
Veteran Member
*****

Avatar

Posts: 2317
Reputation: 48
– / – / Flag
Joined: Feb 2005
Status: Away
O.P. overlaying text on image in php
why is it that when i try to overlay a text file with line breaks, it shows some random symbol instead?

[Image: write.php]

should be

Some
Random
Text

code:
<?php
header("Content-type: image/png");
$im    = imagecreatefrompng("sigs/chichan.png");
$color = imagecolorallocate($im, 0, 0, 0);
$file = fopen("text.txt","r");
$text = fread($file, filesize("text.txt"));
$text2 = str_replace("<br />", "\n", $text);
imagestring($im, 2, 100, 20, $text2, $color);
imagepng($im);
imagedestroy($im);
fclose ($file);
?>

(it shows the symbol when the txt just has line breaks or when i replace something with \n)

-this is ansi, utf doesnt work either

This post was edited on 09-17-2007 at 10:37 PM by Supersonicdarky.
09-17-2007 10:36 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
overlaying text on image in php - by Supersonicdarky on 09-17-2007 at 10:36 PM
RE: overlaying text on image in php - by Ezra on 09-17-2007 at 11:15 PM
RE: overlaying text on image in php - by Supersonicdarky on 09-17-2007 at 11:18 PM
RE: overlaying text on image in php - by WDZ on 09-17-2007 at 11:21 PM
RE: overlaying text on image in php - by Supersonicdarky on 09-17-2007 at 11:23 PM
RE: overlaying text on image in php - by Ezra on 09-17-2007 at 11:34 PM
RE: overlaying text on image in php - by Supersonicdarky on 09-17-2007 at 11:49 PM
RE: overlaying text on image in php - by roflmao456 on 09-18-2007 at 12:38 AM
RE: overlaying text on image in php - by Supersonicdarky on 09-18-2007 at 12:41 AM
RE: overlaying text on image in php - by WDZ on 09-18-2007 at 01:40 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On