RE: [PHP] The Histor of The Kewl Script

From: Date: Sat, 29 Sep 2001 16:44:11 +0000
Subject: RE: [PHP] The Histor of The Kewl Script
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-69300@lists.php.net to get a copy of this message
No, I though of it. The maximum amount of colors are 255, I could even use a single char to define them, but will be constricted using them 2 (common, browser want understand a chr(13) and so). So 4 bytes off. Another wonderful thing is that I might not have to closing the tags if using CSS. It shows up like it is working here. This should deduct about 20-50% from the HTML load. And the next step will be merging verticals. The only downline is now that a simple 100x100 graphic is at least 10.000 loops. More you loop more you wait for the damn page to load. But the technology behind on the server can always be improved - GIANT AMOUNT OF HTML needs to be reduced NOW. I will have something to show you within a few hours Maxim Maletsky www.PHPBeginner.com -----Original Message----- From: ReDucTor [mailto:sjdtmv@tpg.com.au] Sent: domenica 29 luglio 2001 18.31 To: Maxim Maletsky (PHPBeginner.com); 'JSheble'; 'General PHP List' Subject: Re: [PHP] The Histor of The Kewl Script So the best way is using CSS if there is more then one occerence, but with your method, you see if its only to bytes for the name of the class, that limits it to only a certain amount of colors, but as that expands to length of the class name, it might turn out to be longer, and quicker to use the font tag...making a script to handle and calculate all of this, is going to be fun....but you must also keep in mind that if it gets to much of a load its going to start effecting the server, but that will take a bit...its mainly i/o that will slow down anything, so making the size of the output small is going to improve it, unless the script its self gets to a few mb, but that will take a bit, i don't know why i am saying this because the likly hood of changing a script like this into a few mb is very rare....hehe - James "ReDucTor" Mitchell ----- Original Message ----- From: "Maxim Maletsky (PHPBeginner.com)" <php-general@phpbeginner.com> To: "'ReDucTor'" <sjdtmv@tpg.com.au>; "'JSheble'" <JustForMailingLists@wizaerd.com>; "'General PHP List'" <php-general@lists.php.net> Sent: Sunday, September 30, 2001 1:55 AM Subject: RE: [PHP] The Histor of The Kewl Script > > I think I resolved the problem. > Apparently there's a chance of compressing the whole graphic way > deeper by combining HTML with CSS right inside the image HTML itself. > > In this invention I declare a class for color that repeats more then x > amount of times, then refer to it in this way "<b class>". > > The formula is quite long, but looks like will work. It is also safe > because PHP will calculate if it makes any since to change <font> into > <class> basing on the amount of occurrences. > > Some of my formulas: > > **** > > .ab{color:000000} = 18 bytes > <b class=ab> = 13 bytes > <FONT COLOR=000000></FONT> = 26 bytes > > Assuming the colored graphic 100px*100px; > Total pixels = 10.000 > > when up to 38 unique colors > CSS Definition = 17 bytes > CSS Tag = 12 bytes > > > Minimum sequent occurence = 2 > formula: CSS/HTML (17+12*2)=41 << > (26*2)=52 > It is a gain of at least 14 bytes per tag. > > > Assuming 1.000 tags with max. occ. > maximum size 12*1.000+17*38+10.000 = 22.646 (instead of > 36.000) > Saved 14.000k (37%) > > Assuming 2.000 tags with max. occ. > maximum size 12*2.000+17*38+10.000 = 34.646 (instead of > 62.000) > Saved 28.000k (44%) > > Assuming 5.000 tags with max. occ. (LIMIT) > maximum size 12*5.000+17*38+10.000 = 70.646 (instead of > 140.000) > Saved 70.000k (50%) > > > > > when up to 1444 unique colors > CSS Definition = 18 bytes > CSS Tag = 13 bytes > > Minimum sequent occurence = 2 > formula: CSS/HTML (18+13*2)=44 << > (26*2)=52 > > It is a gain of at least 13 bytes per tag. > > Assuming 5.000 tags with max. occ. (LIMIT) > maximum size 13*5.000+(18*1440)+10.000 = 101.646 > (instead of 140.000) > Saved 70.000k (28%) > > > Multipliying Tag occurances we arrive to much results. > The examples here are the minums. (and favored to HTML solution) > > Another thing is the fact that the style shits will be only created > for those repeating ones, starting from a single 26 > > **** > > Will see if browser won't crash. It might though. > > Maxim Maletsky > www.PHPBeginner.com > > > > -----Original Message----- > From: ReDucTor [mailto:sjdtmv@tpg.com.au] > Sent: domenica 29 luglio 2001 14.02 > To: Maxim Maletsky (PHPBeginner.com); 'JSheble'; 'General PHP List' > Subject: Re: [PHP] The Histor of The Kewl Script > > > I just found one, as i posted this(my domain php-webmaster.com), i > just found out its hosted on one with GD Version between 1.3 and > 1.6.1, but so far i am trying it, and its just not displaying any > actully text, so, but it reachs the end, because it shows </body> and > </html>....wierd... > ----- Original Message ----- > From: "Maxim Maletsky (PHPBeginner.com)" <php-general@phpbeginner.com> > To: "'ReDucTor'" <sjdtmv@tpg.com.au>; "'JSheble'" > <JustForMailingLists@wizaerd.com>; "'General PHP List'" > <php-general@lists.php.net> > Sent: Saturday, September 29, 2001 9:59 PM > Subject: RE: [PHP] The Histor of The Kewl Script > > > > We will have one very soon. Give me an hour or so and you'll have > > access to it :-) > > > > > > Maxim Maletsky > > www.PHPBeginner.com > > > > > > -----Original Message----- > > From: ReDucTor [mailto:sjdtmv@tpg.com.au] > > Sent: domenica 29 luglio 2001 13.37 > > To: Maxim Maletsky (PHPBeginner.com); 'JSheble'; 'General PHP List' > > Subject: Re: [PHP] The Histor of The Kewl Script > > > > > > Yep, I started it :D I think its cool, thats lots of people are > > playing around with it now, its turning out alot better then what i > > expected... > > > > I still havn't got it up a server i can play with, hehe, if anyone > > knows a free host, that has GD support, and isn't windows, because > > windows machines crash with ImageColorAt, and well thats one of the > > main functions of the script, well with out it there wouldn't be a > > script, and i don't feel like going and finding out how a .png, or a > > .jpg image format is, to make something with fopen(), fread(), etc > > > > I did some changes and made it only add the font tag if that color > > wasn't the previous color :D(i posted it agian, somewhere) > > > > - James "ReDuCTor" Mitchell > > > > > > ----- Original Message ----- > > From: "Maxim Maletsky (PHPBeginner.com)" > > <php-general@phpbeginner.com> > > To: "'JSheble'" <JustForMailingLists@wizaerd.com>; > > "'General PHP > > List'" <php-general@lists.php.net> > > Sent: Saturday, September 29, 2001 9:28 PM > > Subject: RE: [PHP] The Histor of 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:JustForMailingLists@wizaerd.com] > > > 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:sjdtmv@tpg.com.au] > > > > Sent: Friday, September 28, 2001 9:37 PM > > > > To: Matt Greer; php-general@lists.php.net > > > > 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" <tortus@rcnchicago.com> > > > > To: <php-general@lists.php.net> > > > > 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: php-general-unsubscribe@lists.php.net > > > > > For additional commands, e-mail: > > > > > php-general-help@lists.php.net To > > > > > > > contact the list administrators, e-mail: > > > > > php-list-admin@lists.php.net > > > > > > > > > > > > > > > > > -- > > > > PHP General Mailing List (http://www.php.net/) > > > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > > > For additional commands, e-mail: php-general-help@lists.php.net > > > > To > > > > > contact the list administrators, e-mail: > > > > php-list-admin@lists.php.net > > > > > > > > > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > > For additional commands, e-mail: php-general-help@lists.php.net To > > > contact the list administrators, e-mail: > > > php-list-admin@lists.php.net > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > > For additional commands, e-mail: php-general-help@lists.php.net To > > > contact the list administrators, e-mail: > > > php-list-admin@lists.php.net > > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net To > contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net To > contact the list administrators, e-mail: php-list-admin@lists.php.net > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#69300) next »