iTom
11-24-2006, 08:38 PM
I decided to write an ASCII art PHP and GD script. It creates a composition out of letters and symbols you find on your everyday keyboard. It looks at each pixel in a PNG image, pokes it, prods it and then gets the colors for the position. It then calculates an average color value composed of red, green and blue. It then divides that number by 3 and gets a number from 0-85. It chooses a symbol from this. Quite complex for 30 lines (or so) of code. :P
++++++++V*<<:+++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++
+++++++?$6&B8;+++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++=(*++++++++++++++++
+++++++%8++*MB*++++++++9999;++++++++++++++++++++++ +++++++++++++++++++++=)))(((+++++()))(=+++
+++++++%P''~^V++++++++6#$$@$*+++++++++++++++++++++ +++*;%%%%>*+++++++++=)((((()(++(()(((((=++
+++++++%P ~V#*++++++*%P-_*%v+++*++++++++++++*+++++*8#BAXX6A@;++++++++((((( ((()(+((((((((=++
+++++++%P ~V8*++++++*&* j?^:>V8??v;+++*<vvv%vv<*:8#?=)__-)?%<+++++++((((((((((()((((((((++
+++++++%P ~V?+++++++*&> (9##@??^?B#^<*?#8?^?P##X9#V- \?&<+++++=((((((((()))((((((((=+
+++++++%P ~V#*+++++++&&+)^##V*\i-\+V%$?Bv(\~!|*v9#?~ ~_ /#?+++++=(((((((((())((((((((=+
+++++++%P ~V?+++++++*V#%9##V- ~*@&*_ '~+9X>~~+>v+_ ~^&>(=++=((((((((((((((((((()++
+++++++%P ~V8*++++++*?vvv?V- ~v?_ _>##^^8##A- '*#V)((++((((((((((((((((((((++
+++++++%P ~V#*++++++?@\__*+ /??>~ (9* |^?+-_*B########+''+#V(())+(((((((((((((((((((=++
+++++++%P ~VV+++++++M#i *+ (B%%VP$%+ (P%%XV@###B*\-~-_ -#V((((+=((((((((((((((((()+++
+++++++%P ~V#*++++++M#- _<*' ~/+V8@%*' ~-*?8###6j -#V(((()=((((((((((((((()(=+++
+++++++%P ~V6*++++++M# _<?/' _/?#6)~ ~)?#8/ '_' -#V(((())((((((((((((((((=++++
+++++++%P ~V?*++++++9# _<#?*i__ !?#X*/~' \?*~ '\*:*_ -#V((((((((((((((((((((((+++++
+++++++%P ~V#?^^^^^^%# _<###?v>+\_ +###9V**j +- j?###)' ~?X*(((((((((((((((((((=++++++
+++++++%P ~*A^VVVVVVVV _<##^V##&?+~ ~#8VM###^! /\' -^###( _*#X*(((((((((((((((((=+++++++
+++++++%P '_-~~~~~~~~* _<?)~~V##?\ _P-~|?##Aj /*_ '\>>*_ -*?6+(((((((((((((((=++++++++
+++++++%P * _<^~ _+*-' |P~ _*(_' *&) ~~~ ~:#*((((((((((((((=+++++++++
+++++++%M~~~~~_~__~__~*~~~>#*_ _%#V' '/?##;_~ ~_~'~v#*((((((((())()(++++++++++
+++++++M&<<<<<&>V6<?^<%<<<?##*~~ '_-9@A9+~~ _~(?&X9@&*----:%;)+?8+(((((((((+=((+++++++++++
+++++++*?????PPPPPPPPP????P?&#V*))+>A#?:6#^*()*^#B<+*?X##P9##M####*((((((()(++++++++++++++++
++++++++*******************+>?@####X?^*+;?8####%?>+++**^^???^*^^^V+(((((()(+++++++++++++++++
++++++++++++++++++++++++++++++>vvvv*++++++*vvvv<+++++++++***+++++=)((((()+**++++++++++++++++
++++++++???????++++++++++++++^?^*+++++++**++++++++ ++++++++***^*V++()((((*?MM**?????*++++++++
+++++++P#######P++++++++++++?@#@?****++;AAV+++++++ +++++++VAA8@B$^++))((*B#^BA8#####A*+++++++
+++++++%M_____M%**+++++++++*Mv~<@%&&%%;%P^$v++++*****+++V@$%#*+@?*++)((V@+~*%#^_(\+&*+++++++
+++++++%P ~~~~X#&#?*;;;%VM?^9>~;8V++^@#M--?#V;<V##%B@@;+^#('?\_v%?*+(/-^^- (%#V \-+B*+++++++
+++++++%P =&X%#P*M##XM@X???A#>~*='__~^#B*+^P$6##B^*=vXB*^#*++-_=v#;+++v#V~_'?#V \-+B*+++++++
+++++++%P i*(V$v_)?P(|A+~~~+^;~*:)><~)$%??*\*)>?;_~_'+B*^#6?- '_*#;+++^&+_+_*#V \-+B*+++++++
+++++++%P ~~~+B$*~|/~=&i~(=_-*~<&V<<~_%M\(j _~+!~|*(>B*V9++<~_*?X*++*#^~+^~\#V \-+B*+++++++
+++++++%P \VV?$#&* -P#i~VA*_+~*>\__' %? -j_*V'/\~~(*%$^V^-=B\_v#8;++PB+ /*_~#V \-+B*+++++++
+++++++%P =#####B+ -P#i~V#>_+~*_~==_ %? -j-?# !V=\~_*#XV^-=B\-??#A:*#P- ~_ 'VV \-+B*+++++++
+++++++%P =##V<%*~-(_/Bi~V?\ +~+ -^Bj >? -j/9#'+?V8M~_#XV^-=B*_;(+X<*#^'-+++'iV \-+B*+++++++
+++++++%P '~~~~*'-^$*_/i _~'=*~*+'~~''_+'ij(6;'(+~+(~_#XV^-+B*'''*@<B8--^%&$/~V \-(B*+++++++
+++++++%8)\++++:\^%%#*Bi'~-+9Viv6*|-);i:+*=*AviV?!__-<@?V?**&%)-(?&<%8-*#^*A>!*/+((A*+++++++
+++++++?####A%9##%Vv&6$i~V##8$#$6#######%A##6@###Pvv&@?*>BA%9####B<+^###&v*?@######9*+++++++
++++++++^^^^:v*^^v++>^%)~V8^*V^V*^^^^^^^v;^^*V^^^?????*++>:v*^^^^<+++^??v++*^^^^^^^*++++++++
+++++++++++++++++++++v%*~V?++++++++++++++++++++++* +++*++++++++++++++++**++++++++++++++++++++
+++++++++++++++++++++*&?V6?++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++
++++++++++++++++++++++>##X*++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++
+++++++++++++++++++++++**+++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++
I hope you like it. Give me some comments, or ask for the source code (released under Open Source GNU License), because it wouldn't fit on here. Stupid 5000 character limit - it doesn't allow both. :(
++++++++V*<<:+++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++
+++++++?$6&B8;+++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++=(*++++++++++++++++
+++++++%8++*MB*++++++++9999;++++++++++++++++++++++ +++++++++++++++++++++=)))(((+++++()))(=+++
+++++++%P''~^V++++++++6#$$@$*+++++++++++++++++++++ +++*;%%%%>*+++++++++=)((((()(++(()(((((=++
+++++++%P ~V#*++++++*%P-_*%v+++*++++++++++++*+++++*8#BAXX6A@;++++++++((((( ((()(+((((((((=++
+++++++%P ~V8*++++++*&* j?^:>V8??v;+++*<vvv%vv<*:8#?=)__-)?%<+++++++((((((((((()((((((((++
+++++++%P ~V?+++++++*&> (9##@??^?B#^<*?#8?^?P##X9#V- \?&<+++++=((((((((()))((((((((=+
+++++++%P ~V#*+++++++&&+)^##V*\i-\+V%$?Bv(\~!|*v9#?~ ~_ /#?+++++=(((((((((())((((((((=+
+++++++%P ~V?+++++++*V#%9##V- ~*@&*_ '~+9X>~~+>v+_ ~^&>(=++=((((((((((((((((((()++
+++++++%P ~V8*++++++*?vvv?V- ~v?_ _>##^^8##A- '*#V)((++((((((((((((((((((((++
+++++++%P ~V#*++++++?@\__*+ /??>~ (9* |^?+-_*B########+''+#V(())+(((((((((((((((((((=++
+++++++%P ~VV+++++++M#i *+ (B%%VP$%+ (P%%XV@###B*\-~-_ -#V((((+=((((((((((((((((()+++
+++++++%P ~V#*++++++M#- _<*' ~/+V8@%*' ~-*?8###6j -#V(((()=((((((((((((((()(=+++
+++++++%P ~V6*++++++M# _<?/' _/?#6)~ ~)?#8/ '_' -#V(((())((((((((((((((((=++++
+++++++%P ~V?*++++++9# _<#?*i__ !?#X*/~' \?*~ '\*:*_ -#V((((((((((((((((((((((+++++
+++++++%P ~V#?^^^^^^%# _<###?v>+\_ +###9V**j +- j?###)' ~?X*(((((((((((((((((((=++++++
+++++++%P ~*A^VVVVVVVV _<##^V##&?+~ ~#8VM###^! /\' -^###( _*#X*(((((((((((((((((=+++++++
+++++++%P '_-~~~~~~~~* _<?)~~V##?\ _P-~|?##Aj /*_ '\>>*_ -*?6+(((((((((((((((=++++++++
+++++++%P * _<^~ _+*-' |P~ _*(_' *&) ~~~ ~:#*((((((((((((((=+++++++++
+++++++%M~~~~~_~__~__~*~~~>#*_ _%#V' '/?##;_~ ~_~'~v#*((((((((())()(++++++++++
+++++++M&<<<<<&>V6<?^<%<<<?##*~~ '_-9@A9+~~ _~(?&X9@&*----:%;)+?8+(((((((((+=((+++++++++++
+++++++*?????PPPPPPPPP????P?&#V*))+>A#?:6#^*()*^#B<+*?X##P9##M####*((((((()(++++++++++++++++
++++++++*******************+>?@####X?^*+;?8####%?>+++**^^???^*^^^V+(((((()(+++++++++++++++++
++++++++++++++++++++++++++++++>vvvv*++++++*vvvv<+++++++++***+++++=)((((()+**++++++++++++++++
++++++++???????++++++++++++++^?^*+++++++**++++++++ ++++++++***^*V++()((((*?MM**?????*++++++++
+++++++P#######P++++++++++++?@#@?****++;AAV+++++++ +++++++VAA8@B$^++))((*B#^BA8#####A*+++++++
+++++++%M_____M%**+++++++++*Mv~<@%&&%%;%P^$v++++*****+++V@$%#*+@?*++)((V@+~*%#^_(\+&*+++++++
+++++++%P ~~~~X#&#?*;;;%VM?^9>~;8V++^@#M--?#V;<V##%B@@;+^#('?\_v%?*+(/-^^- (%#V \-+B*+++++++
+++++++%P =&X%#P*M##XM@X???A#>~*='__~^#B*+^P$6##B^*=vXB*^#*++-_=v#;+++v#V~_'?#V \-+B*+++++++
+++++++%P i*(V$v_)?P(|A+~~~+^;~*:)><~)$%??*\*)>?;_~_'+B*^#6?- '_*#;+++^&+_+_*#V \-+B*+++++++
+++++++%P ~~~+B$*~|/~=&i~(=_-*~<&V<<~_%M\(j _~+!~|*(>B*V9++<~_*?X*++*#^~+^~\#V \-+B*+++++++
+++++++%P \VV?$#&* -P#i~VA*_+~*>\__' %? -j_*V'/\~~(*%$^V^-=B\_v#8;++PB+ /*_~#V \-+B*+++++++
+++++++%P =#####B+ -P#i~V#>_+~*_~==_ %? -j-?# !V=\~_*#XV^-=B\-??#A:*#P- ~_ 'VV \-+B*+++++++
+++++++%P =##V<%*~-(_/Bi~V?\ +~+ -^Bj >? -j/9#'+?V8M~_#XV^-=B*_;(+X<*#^'-+++'iV \-+B*+++++++
+++++++%P '~~~~*'-^$*_/i _~'=*~*+'~~''_+'ij(6;'(+~+(~_#XV^-+B*'''*@<B8--^%&$/~V \-(B*+++++++
+++++++%8)\++++:\^%%#*Bi'~-+9Viv6*|-);i:+*=*AviV?!__-<@?V?**&%)-(?&<%8-*#^*A>!*/+((A*+++++++
+++++++?####A%9##%Vv&6$i~V##8$#$6#######%A##6@###Pvv&@?*>BA%9####B<+^###&v*?@######9*+++++++
++++++++^^^^:v*^^v++>^%)~V8^*V^V*^^^^^^^v;^^*V^^^?????*++>:v*^^^^<+++^??v++*^^^^^^^*++++++++
+++++++++++++++++++++v%*~V?++++++++++++++++++++++* +++*++++++++++++++++**++++++++++++++++++++
+++++++++++++++++++++*&?V6?++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++
++++++++++++++++++++++>##X*++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++
+++++++++++++++++++++++**+++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++
I hope you like it. Give me some comments, or ask for the source code (released under Open Source GNU License), because it wouldn't fit on here. Stupid 5000 character limit - it doesn't allow both. :(