Re: [PHP] The Kewl Script

2001-09-30 Thread Ashley M. Kirchner

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

2001-09-30 Thread Maxim Maletsky \(PHPBeginner.com\)

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]




Re: [PHP] A kewl Script, for you someone to test, and show me theresults

2001-09-27 Thread Rasmus Lerdorf

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

2001-09-27 Thread Rasmus Lerdorf

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

2001-09-27 Thread ReDucTor

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]