<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/17398" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2009-12-09T11:01:21-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/17398</id>

		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2009-12-08T15:28:52-04:00</updated>

		<published>2009-12-08T15:28:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91241#p91241</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91241#p91241"/>
		<title type="html"><![CDATA[Converting text strings to gif files]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91241#p91241"><![CDATA[
Assuming the GD-library and php-module is available, the following php-script should do the trick:<br><div class="codebox"><p>Code: </p><pre><code>&lt;?php$im = imagecreate(200, 20);$bg = imagecolorallocate($im, 255, 255, 255);$text = imagecolorallocate($im, 0, 0, 0);imagefill($im, 0, 0, $bg);imagestring($im, 5, 0, 0, $argv[0], $text);imagegif($im, "song.gif");?&gt;</code></pre></div>I havn't verified the code, as I don't use the GD library myself, but should work to my best knowledge.<br>Usage:<div class="codebox"><p>Code: </p><pre><code>php image.php -- "Here we go again - Whitesnake"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Tue Dec 08, 2009 3:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dj-zath]]></name></author>
		<updated>2009-12-08T12:15:13-04:00</updated>

		<published>2009-12-08T12:15:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91239#p91239</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91239#p91239"/>
		<title type="html"><![CDATA[Converting text strings to gif files]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91239#p91239"><![CDATA[
Hi nml!<br><br>first off, I apologize if I confused anyone..  I was merely trying to give as much detail as I thought nessessary.<br><br>second, I have "bits and pieces" as far as knowledge goes..  an odd combanation.. (but thats beyond the scope of this post.)<br><br>In the end, all I needed is to drop the output <em class="text-italics">Song.gif</em> to the webserver which is merely a couple dir's away (all on the same machine) once there, then Apache takes care of all the rest..  I just needed a way to turn a string in TCL such as:<br><div class="codebox"><p>Code: </p><pre><code>set $Song "Take on Me - A-Ha";</code></pre></div>then have $Song turned into <em class="text-italics">Song.gif</em>...  really, that simple!<br><br>I'll try your suggestion and see what happens.. thanks for the help and we'll see what comes of this..<br><br>-DjZ<br><img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10318">dj-zath</a> — Tue Dec 08, 2009 12:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2009-12-09T11:01:21-04:00</updated>

		<published>2009-12-07T15:15:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91230#p91230</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91230#p91230"/>
		<title type="html"><![CDATA[Converting text strings to gif files]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91230#p91230"><![CDATA[
Actually, that's pretty much what I've said all along... it really is that simple..<br>Why I'm saying far from trivial, is that you either need a php-environment or make sure external softwares such as netpbm or ImageMagick is installed. Once that's fulfilled, you need to know how to use these tools (thus we're really not talking of native tcl anymore).<br>I generally try not to assume that the ones reading my posts have a perfect knowledge in 20+ different languages, libraries, software packages, etc... Here on egghelp, I do assume some basic knowledge in tcl scripting, or the interrest of gaining such knowledge using various available resources.<br><br>Unfortunately, in your posts you start rambling about IFrames, mod_rewrite rules, etc, making me very confused at which location you want the image created, what resources are available there, and so on.<br>To avoid confusion, keep your posts simple and descriptive. Whether your myspace-page allows javascript or not is really of no interrest at all...<br><br>To use php to generate an image, just do something like this:<div class="codebox"><p>Code: </p><pre><code>catch {exec php -f ./generateImage.php -- $text} result</code></pre></div>This would save any output from the generateImage.php script into the variable <em class="text-italics">result</em>. Whether you then want your php-script to output the image data, or write the image to disk, or ftp it to some offsite location is entirely up to you.<br><br>Edit: dropped the list command that managed to sneak in there.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Mon Dec 07, 2009 3:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dj-zath]]></name></author>
		<updated>2009-12-07T12:30:48-04:00</updated>

		<published>2009-12-07T12:30:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91228#p91228</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91228#p91228"/>
		<title type="html"><![CDATA[Converting text strings to gif files]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91228#p91228"><![CDATA[
Nml:<br><br>hi there buddy!<br><br>as I look at all this, I might just  give it up altogether.. I thought it would be something <em class="text-italics">simple</em> to do.. mind you, theres a lot of fancy-smancy stuff one can do with graphics, however, I just needed something simple- "take plain text and convert it to a simple gif using a standard font on an invisable  (or white space) background" but it seems that the overhead to do this is daunting!<br><br>I read somewhere that I could exec php and have this done lickity-split with next to no overhead and, being I allready have PHP installed (shell and apache) I thought it could be something I can call up.. and be done with it..<br><br>that doesn't seem to be the case, though, since I have to purchase and then install  font libs and format libs and then conversion libs and then text libs.. etc etc etc...<br><br>it was just an idea.. scratched!<br><br>-DjZ-<br><img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10318">dj-zath</a> — Mon Dec 07, 2009 12:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2009-12-04T17:02:34-04:00</updated>

		<published>2009-12-04T17:02:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91193#p91193</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91193#p91193"/>
		<title type="html"><![CDATA[Converting text strings to gif files]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91193#p91193"><![CDATA[
I guess the point assumed by both user and me, is that you were to generate the image locally, and then transfer it to your myspace/facebook/whatever using whatever means available... Not transfer a generated php-script or such...<br><br>Php can be run in command line mode, and is able to pass arguments on to the running application. All facilities (perhaps except the apache-extensions) are available in this mode, although $_POST, $_SERVER, and the other predefined superglobals would not have any meaning unless used as a httpd CGI application. As such, it's a very potent environment, and can handle most of your tasks.<br><br>The netpbm is a software package of several hundred tiny binaries that perform one single task on a specific image file. It uses a special image format(s) (called netpbm), and comes with a multitude of converters for most known image types. It also includes a library with the rudimentary functions needed for working with the netpbm format(s).<br><br>ImageMagick is a similar software package, and with the addition of TclMagick, you get a bridge between tcl and ImageMagick that'll allow you to interact with ImageMagick without using the exec command (although you are still invoking child processes to do the work).<br><br>All of the above mentioned three can rather easily create a new image with a content by your instructions, to be saved on the local filesystem. PHP has the additional feature of being able to run additional code, such as generating the image in memory and then FTP it to a remote location instead of saving it on the local filesystem. The netpbm and IM packages are generally known to render better-looking images than the GD library used by PHP, especially with image transforms such as resize. Which one to use, I suppose all comes down to what's available on the local system, and the needs of the application...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Fri Dec 04, 2009 5:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dj-zath]]></name></author>
		<updated>2009-12-04T10:47:53-04:00</updated>

		<published>2009-12-04T10:47:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91188#p91188</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91188#p91188"/>
		<title type="html"><![CDATA[Converting text strings to gif files]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91188#p91188"><![CDATA[
Hi there User!  and thanks  for your reply..<br><br>The main reason is that I can not pass or export said info to places like <em class="text-italics">myspace</em> or <em class="text-italics">facebook</em>!<br><br>These places do NOT allow any kind of scripting- EXPECIALLY <em class="text-italics">javascript</em>!<br><br>I have used rewrite rules to get php through.. but thats about the extent of my knowledge. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>I got images through.. but I can't get TEXT through without either using an I-frame (not allowed) or to turn it into a link.. when, again, they'll allow a link, but it disrupts the flow of things since they make you click (and reclick) "validation" pages (and they say things like <em class="text-italics">this link WILL give you a virus</em> etc etc)<br><br>So, mainly its to get around their "bitch screens" and all that..<br><br>also, I have used TCL to generate php that will call common elements in places that are referenced to one-another, based on multiple varables all sharing the same image(s) and data..<br><br>This way, for example, "status lights" will all contain one or two gif files instead of (re)downloading the same gif file(s) multiple times on a given viewed page.   its done for <em class="text-italics">efficiency</em>. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>User:  thanks for the link.. I'll have a look once I finish this post.<br><br>-DjZ-<br><img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10318">dj-zath</a> — Fri Dec 04, 2009 10:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2009-12-03T17:08:46-04:00</updated>

		<published>2009-12-03T17:08:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91176#p91176</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91176#p91176"/>
		<title type="html"><![CDATA[Converting text strings to gif files]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91176#p91176"><![CDATA[
If you really want to generate images, try <a href="http://www.imagemagick.org/" class="postlink">ImageMagick</a> via <a href="http://tclmagick.sourceforge.net/" class="postlink">TclMagick</a>...<br><br><a href="http://www.imagemagick.org/Usage/text/" class="postlink">http://www.imagemagick.org/Usage/text/</a><br><br>...but I don't see why that would be any easier than passing the data to the client some other way (javascript/remote server side include/rpc/whatever)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Thu Dec 03, 2009 5:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dj-zath]]></name></author>
		<updated>2009-12-02T17:26:24-04:00</updated>

		<published>2009-12-02T17:26:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91164#p91164</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91164#p91164"/>
		<title type="html"><![CDATA[Converting text strings to gif files]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91164#p91164"><![CDATA[
thanks nml..<br><br>using a call to an external app won't be too much of an issue.. as long as it can be done CLI and unattended... (say, the bot calls it up and passes the  string/varable data over)<br><br>the reason is because without it I'll have to use I-FRAMES.. and we know how pratical I-frames are these days???  NOT!!<br><br>so, I thought maybe I can convert the strings to gif files.. those I can pass directly out of the webserver... <br><br>-DjZ-<br><img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10318">dj-zath</a> — Wed Dec 02, 2009 5:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2009-12-02T17:16:06-04:00</updated>

		<published>2009-12-02T17:16:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91163#p91163</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91163#p91163"/>
		<title type="html"><![CDATA[Converting text strings to gif files]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91163#p91163"><![CDATA[
Possible; yes, though far from trivial. I'd recommend you rely on some external application to generate the image instead. Could probably use php along with the GD library for that, or the netpbm software package (if available).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed Dec 02, 2009 5:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dj-zath]]></name></author>
		<updated>2009-12-02T16:17:50-04:00</updated>

		<published>2009-12-02T16:17:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91160#p91160</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91160#p91160"/>
		<title type="html"><![CDATA[Converting text strings to gif files]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91160#p91160"><![CDATA[
Hi everyone, Speechles and nml!<br><br>is this possable in TCL?<br><br>I want to take text strings (via varables) and convert them to simple gif files- nothing fancy,  just "black text on an invisable background".<br><br>I heard you can do this in php.. though I couldn't find anything that showed HOW...<br><br>perhaps someone out there can offer some guidence and/or help?<br><br>(script examples would be greatly-appreciated!)<br><br>-DjZ-<br><img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10318">dj-zath</a> — Wed Dec 02, 2009 4:17 pm</p><hr />
]]></content>
	</entry>
	</feed>
