[PHP] The Kewl Script
See, the problem now is not in the page load as of PHP side. Yeah, it takes a ces or so... The real problem are those funny 400k page! :-) Maxim Maletsky www.PHPBeginner.com -Original Message- From: JSheble [mailto:[EMAIL PROTECTED]] Sent: sabato 29 settembre 2001 7.17 To: General PHP List Subject: RE: [PHP] The Histor of The Kewl Script I have a copy of a class written my Markus Dobel called HTMLImage that does this same thing, but with one subtle difference. It reads in a text file, using the letters and/or words contained within it to display the image. It can use GIF (if the version of GD supports GIF files), a JPG or a PNG. Here are two examples, the first a PNG and the second a JPG. http://www.wizaerdsrealm.com/testscripts/index.php and here is the source http://www.wizaerdsrealm.com/testscripts/index.phps I downloaded this a while ago because I thought it was pretty cool... and fairly fast as well... Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, PHP/mySQL ColdFusion/MSSQL http://www.wizaerd.com = The Canvas Expert Online The #1 Resource For Canvas Information http://www.TheCanvasExpert.com = -Original Message- From: ReDucTor [mailto:[EMAIL PROTECTED]] Sent: Friday, September 28, 2001 9:37 PM To: Matt Greer; [EMAIL PROTECTED] Subject: Re: [PHP] The Histor of The Kewl Script Here is the original, in color, you will have to add $im in the first arg, and move the ImageColorAt to the second arg...hehehe, Btw it doesn't work on Windows Machines, Which is the original reason it was posted here But now its advaned, everyones trying to modify it, and getting very nice effects I got the idea from a c++ app i found, that turned images into a html page... - James ReDucTor Mitchell - Original Message - From: Matt Greer [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, September 29, 2001 2:32 PM Subject: Re: [PHP] (was:A kewl Script) LOOK WHAT IT BECAME! On Friday 28 September 2001 22:58, Maxim Maletsky \(PHPBeginner.com\) wrote: I have only tested it on IE5.5. again, the problem there is the browser that freezes, it is at least 400k page, and zooming it becomes countable in mega bytes. So, that is why browsers get so mad. zoom 100% loaded very nicely in Mozilla for Linux. Looks real good. I tried zoom 200% and after a long wait it showed the pic zoomed at about 2000% Who originated this script, at least the version that got started here today? I'm going to be making a website and I thought this might be a cool effect if used lightly in some places. Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http
Re: [PHP] The Kewl Script
Maxim Maletsky (PHPBeginner.com) wrote: I ported it to use a hybrid of CSS/HTML which slows a bit the browser down but having less size it is way better acceptable than before, plus kewl script is now smart enough to choose where to use CSS and where FONT depending on occurrences of that color. I'd just like to know what browsers (and versions) on what platforms are you viewing these pages of yours. I have Nutscrape 4.78 and 6.1 and IE 5.5, as well as 6.0, on Winblows 98, and all four of them can not display your rendered page. IE just plain crashes. At least Nutscrape tries, and manages just fine, with the image all compressed and unidentifiable. So, what will be the next step now? Make it work properly? grin -- H | Life is the art of drawing without an eraser. - John Gardner + Ashley M. Kirchner mailto:[EMAIL PROTECTED] . 303.442.6410 x130 Director of Internet Operations / SysAdmin. 800.441.3873 x130 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave, #6 http://www.pcraft.com . . .. Boulder, CO 80303, U.S.A. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] The Kewl Script
You're absolutely right, Ashley. The only browser you can go wild with is IE - which crashes eventually. ;-) If I could reduce the sizes of HTML itself then, and only then, it makes sense working on the compatibilities. With PHP it should not be a problem as managing to find out users setups is relatively easy. Maxim Maletsky www.PHPBeginner.com -Original Message- From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED]] Sent: domenica 30 settembre 2001 9.51 To: [EMAIL PROTECTED] Subject: Re: [PHP] The Kewl Script Maxim Maletsky (PHPBeginner.com) wrote: I ported it to use a hybrid of CSS/HTML which slows a bit the browser down but having less size it is way better acceptable than before, plus kewl script is now smart enough to choose where to use CSS and where FONT depending on occurrences of that color. I'd just like to know what browsers (and versions) on what platforms are you viewing these pages of yours. I have Nutscrape 4.78 and 6.1 and IE 5.5, as well as 6.0, on Winblows 98, and all four of them can not display your rendered page. IE just plain crashes. At least Nutscrape tries, and manages just fine, with the image all compressed and unidentifiable. So, what will be the next step now? Make it work properly? grin -- H | Life is the art of drawing without an eraser. - John Gardner + Ashley M. Kirchner mailto:[EMAIL PROTECTED] . 303.442.6410 x130 Director of Internet Operations / SysAdmin. 800.441.3873 x130 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave, #6 http://www.pcraft.com . . .. Boulder, CO 80303, U.S.A. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] A kewl Script, for you someone to test, and show me the results
Hey, I couldn't be bothered waiting for someone to show me a host that runs php with GD, so i am just going to post the code here, and hope that someone sees it, and checks it out, and shows the results If you can't find a jpg file to test this on, just grab the php jpg one, well i'll post the code now, so people can play with it, remember if you test it place show the results :D btw if you don't understand how to use it, you paste the code into a .php file, and change imgname to the path of an jpg image, if you want to use an png image, just change the im to ImageCreateFromPNG, ok, thats all...please show the results html body bgcolor=#00 ?php $imgname = /path/to/a/jpeg/file; $im = ImageCreateFromJPEG($imgname); $output = ; for($x=0;$ximagesx($im);$x++) { for($y=0;$yimagesy($im);$y++) { $color = ImageColorsForIndex(ImageColorAt($im, $x, $y)); echo font size=\1\ color=\#; echo dechex($color['red']); echo dechex($color['green']); echo dechex($color['blue']); echo \\$/font; } echo br\n; } ? /body/html - James ReDucTor Mitchell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] A kewl Script, for you someone to test, and show me theresults
Oh, by the way, I modified your script a bit and made it load an indexed PNG file instead. This is the modified script: http://www.php.net/~rasmus/reductor.phps And here is the result: http://www.php.net/~rasmus/reductor.php Not sure why you used a $ sign for the character. It sort of throws off the aspect ratio. Try a # instead: http://www.php.net/~rasmus/reductor.php?ch=%23 -Rasmus On Thu, 27 Sep 2001, ReDucTor wrote: Hey, I couldn't be bothered waiting for someone to show me a host that runs php with GD, so i am just going to post the code here, and hope that someone sees it, and checks it out, and shows the results If you can't find a jpg file to test this on, just grab the php jpg one, well i'll post the code now, so people can play with it, remember if you test it place show the results :D btw if you don't understand how to use it, you paste the code into a .php file, and change imgname to the path of an jpg image, if you want to use an png image, just change the im to ImageCreateFromPNG, ok, thats all...please show the results html body bgcolor=#00 ?php $imgname = /path/to/a/jpeg/file; $im = ImageCreateFromJPEG($imgname); $output = ; for($x=0;$ximagesx($im);$x++) { for($y=0;$yimagesy($im);$y++) { $color = ImageColorsForIndex(ImageColorAt($im, $x, $y)); echo font size=\1\ color=\#; echo dechex($color['red']); echo dechex($color['green']); echo dechex($color['blue']); echo \\$/font; } echo br\n; } ? /body/html - James ReDucTor Mitchell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] A kewl Script, for you someone to test, and show me theresults
The imagecolorat() function doesn't work for truecolor images. You will need a an indexed image for this to work. And worse, imagecolorat() actually segfaults when run on a non-indexed image as far as I can tell. Will commit a fix for that shortly. -Rasmus On Thu, 27 Sep 2001, ReDucTor wrote: Hey, I couldn't be bothered waiting for someone to show me a host that runs php with GD, so i am just going to post the code here, and hope that someone sees it, and checks it out, and shows the results If you can't find a jpg file to test this on, just grab the php jpg one, well i'll post the code now, so people can play with it, remember if you test it place show the results :D btw if you don't understand how to use it, you paste the code into a .php file, and change imgname to the path of an jpg image, if you want to use an png image, just change the im to ImageCreateFromPNG, ok, thats all...please show the results html body bgcolor=#00 ?php $imgname = /path/to/a/jpeg/file; $im = ImageCreateFromJPEG($imgname); $output = ; for($x=0;$ximagesx($im);$x++) { for($y=0;$yimagesy($im);$y++) { $color = ImageColorsForIndex(ImageColorAt($im, $x, $y)); echo font size=\1\ color=\#; echo dechex($color['red']); echo dechex($color['green']); echo dechex($color['blue']); echo \\$/font; } echo br\n; } ? /body/html - James ReDucTor Mitchell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] A kewl Script, for you someone to test, and show me the results
Thanks Ramus.. It appears to work nice... I find the $ looks nicer, then an # - James ReDucTor Mitchell - Original Message - From: Rasmus Lerdorf [EMAIL PROTECTED] To: ReDucTor [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, September 27, 2001 5:29 PM Subject: Re: [PHP] A kewl Script, for you someone to test, and show me the results The imagecolorat() function doesn't work for truecolor images. You will need a an indexed image for this to work. And worse, imagecolorat() actually segfaults when run on a non-indexed image as far as I can tell. Will commit a fix for that shortly. -Rasmus On Thu, 27 Sep 2001, ReDucTor wrote: Hey, I couldn't be bothered waiting for someone to show me a host that runs php with GD, so i am just going to post the code here, and hope that someone sees it, and checks it out, and shows the results If you can't find a jpg file to test this on, just grab the php jpg one, well i'll post the code now, so people can play with it, remember if you test it place show the results :D btw if you don't understand how to use it, you paste the code into a .php file, and change imgname to the path of an jpg image, if you want to use an png image, just change the im to ImageCreateFromPNG, ok, thats all...please show the results html body bgcolor=#00 ?php $imgname = /path/to/a/jpeg/file; $im = ImageCreateFromJPEG($imgname); $output = ; for($x=0;$ximagesx($im);$x++) { for($y=0;$yimagesy($im);$y++) { $color = ImageColorsForIndex(ImageColorAt($im, $x, $y)); echo font size=\1\ color=\#; echo dechex($color['red']); echo dechex($color['green']); echo dechex($color['blue']); echo \\$/font; } echo br\n; } ? /body/html - James ReDucTor Mitchell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]