|
|
Comments and Discussions
|
|
 |
|

|
I want to say your work is excellent.I have read your program and find there are many problems for me to understand it.So I wonder whether you can help me with this program. I'll appreciate it if you can do me a faver. My contact is handsomedzl@foxmail.com. Thank you!
|
|
|
|

|
I want to say your work is excellent.I have read your program and find there are many problems for me to understand it.So I wonder whether you can help me with this program. I'll appreciate it if you can do me a faver. My contact is handsomedzl@foxmail.com. Thank you!
|
|
|
|

|
Howdy, I've ported this generator to an Ajax solution by using Gaia Ajax Widgets. It's Open Source just as the original version and it can be found both as a sample running and as a code download here; Ascii Art Generator Ajaxified
--
http://ajaxwidgets.com - THE Open Source Commercial Ajax Component vendor for ASP.NET and Mono
|
|
|
|

|
Nice port. Haven't tried it yet, but looks great.
"A good scientist is a person with original ideas. A good engineer is a person who makes a design that works with as few original ideas as possible." - Freeman Dyson
|
|
|
|

|
Hmm...just doing a search on ASCII art to check up on this article and what do I find?
Some new articles on ASCII art generation in C#. Mostly similar to what this article has but maybe with a (slightly) different spin or implementation. Well, it's nice to have more than one solution, but...sigh...isn't it simpler to avoid re-inventing the wheel?
Anyhow, here's the new articles I found:
Simple ASCII Art Generator[^]
Using C# To Generate ASCII Art From An Image[^]
"A good scientist is a person with original ideas. A good engineer is a person who makes a design that works with as few original ideas as possible." - Freeman Dyson
|
|
|
|

|
Actually, this is probably a good thing. When there are multiple articles for the same topic, people get more information, references, and inputs from different sources. Different articles have different level of usefulness to different people depending on what they are looking for.
> whoami
The system is unable to identify you when you don't even know your name!
|
|
|
|

|
Agreed, you make a good point.
Interesting how all the articles are implemented with C#, no VB.NET. Guess we have more C# experts in this area or it's easier with C#.
"A good scientist is a person with original ideas. A good engineer is a person who makes a design that works with as few original ideas as possible." - Freeman Dyson
|
|
|
|

|
oiii long time no heard from you... what r u doing lately man?
fui
|
|
|
|

|
Busy as usual...
> whoami
The system is unable to identify you when you don't even know your name!
|
|
|
|

|
Hello this is amartya i am new in C# can u give me any idea how to convert or export any sqlserver table data to ascii file it's urg
Thanks in advance
Amartya
|
|
|
|

|
This article isn't a tutorial on C# basics, so I'll keep my answers short.
There is no direct way to do the conversion. You need to programmatically open a connection to the SQL Server, read the table data, and then write each value to file.
Use classes in System.Data.SqlClient for sql connection and reading data (eg. SqlConnection, SqlDataAdapter). Use classes in System.IO for file writing (eg. StreamWriter).
> whoami
The system is unable to identify you when you don't even know your name!
|
|
|
|

|
It can be used for encrypted text transmission too/images' steganography/.
My articles are dedicated to Dr. Ihab Jubran (my brother).
|
|
|
|
|

|
I can't wait to try this out! Very Cool
|
|
|
|

|
Hi Sau Fan,
Would you be interested in posting up my C# windows forms (desktop GUI) port of your ASCII Art Generator? I would like to share it with others and prefer not to host it elsewhere or write a new article for it if I don't have to.
If yes, I can send you the zip package by email.
Regards,
Dave
"A good scientist is a person with original ideas. A good engineer is a person who makes a design that works with as few original ideas as possible." - Freeman Dyson
|
|
|
|

|
Sorry for the late reply, but sure. You can email me your code.
Cheers,
Lee
> whoami
The system is unable to identify you when you don't even know your name!
|
|
|
|

|
Thanks for replying.
What's your email address? It's not listed. You can reply to me from the article's forum via "email" link instead of "reply" link if you don't want to disclose your email address in this forum.
I tried emailing you originally, but your email address is not validated with CodeProject so I can't contact you via email via CodeProject.
"A good scientist is a person with original ideas. A good engineer is a person who makes a design that works with as few original ideas as possible." - Freeman Dyson
|
|
|
|

|
OK, Done. The article is now updated and your source files are included (along with credits to you).
Cheers.
> whoami
The system is unable to identify you when you don't even know your name!
|
|
|
|

|
Thanks
"A good scientist is a person with original ideas. A good engineer is a person who makes a design that works with as few original ideas as possible." - Freeman Dyson
|
|
|
|

|
Hey,
What a great articles!
Thanks
Mehedi Hasan
|
|
|
|

|
Based on this code I'll soon publish a BBCode Art Generator
I'm on a Fuzzy State: Between 0 an 1
|
|
|
|

|
Good luck! I haven't updated the source for a while. Maybe I should fine-tune it sometime soon.
> whoami
The system is unable to identify you when you don't even know your name!
|
|
|
|

|
It's really a very simple change:
It's made on the:
private void GetAsciiImage (StringBuilder output, Bitmap image, ColorMatrix colorMatrix, ColorMatrix grayMatrix)
replacing the:
for (int y = 0; y < grayImage.Height; y++) {
for (int x = 0; x < grayImage.Width; x++) {
Color pixel = grayImage.GetPixel (x, y);
int index = pixel.R * ascii.Length / 256;
string ch = ascii[ascii.Length - index - 1];
if (IsHtmlOutput && UseColors) {
if (!IsGrayScale) pixel = colorImage.GetPixel (x, y);
color = GetHexColor (pixel);
if (color != prevColor) {
if (prevColor != null) output.Append ("</font>");
prevColor = color;
output.Append ("<font color='#");
output.Append (color);
output.Append ("'>");
}
}
output.Append (ch);
}
if (prevColor != null) {
output.Append ("</font>");
prevColor = null;
}
output.Append (IsHtmlOutput ? HtmlNewLine : TextNewLine);
}
by
for (int y = 0; y < grayImage.Height; y++)
{
for (int x = 0; x < grayImage.Width; x++)
{
Color pixel = grayImage.GetPixel(x, y);
int index = pixel.R * ascii.Length / 256;
string ch = ascii[ascii.Length - index - 1];
if (IsHtmlOutput && UseColors)
{
if (!IsGrayScale) pixel = colorImage.GetPixel(x, y);
color = GetHexColor(pixel);
if (color != prevColor)
{
if (prevColor != null) output.Append("[/color]");
prevColor = color;
output.Append("[color='#");
output.Append(color);
output.Append("']");
}
}
output.Append(ch);
}
if (prevColor != null)
{
output.Append("[/color]");
prevColor = null;
}
output.Append (IsHtmlOutput ? HtmlNewLine : TextNewLine);
}
(Note: The only diference are the tags, due BBCode is very similar to HTML)
If you update the article, you're, of course, free to include this modifications.
I've copyed ImageToText class into ImageToBBCode, replacing GetAsciiImage by GetBBCodeImage.
If you need the code write me, and I'll send it.
That's all.
I'm on a Fuzzy State: Between 0 an 1
|
|
|
|

|
This is really neat. I may use this in my stand-alone program that generates html files for filesharing over mirc to spice things up a bit. Thanks!
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
ASCII Art generator in ASP.NET.
| Type | Article |
| Licence | |
| First Posted | 10 Jul 2005 |
| Views | 1,317,258 |
| Downloads | 6,037 |
| Bookmarked | 240 times |
|
|