Imageshack uploader Tool
25 Dec 2008 2 Comments
in C#
Made some tool for imageshack.com although there has been a lot of tools uploading to imageshack, but non of them really support what i needed, so i created my own: here are the features included on my imageshack uploader that somehow i called “Nibbler”
Features:
- Multi threaded simultaneous uploading
- Multi-output formatting
- Auto save last state
- Saving/reloading of upload result
- adding multiple files
- adding folders
- file filters
- anonymous/authenticated uploading
- source code included!
as for the simultaneous uploading on Vista you need to change some registry settings to allow vista to connect to the same host multiple times(default settings is 2).
as for the multi output formatting you can open App/Data/config.xml then add an entry under
<ExportOption>
<KeyName>Export as html</KeyName>
<Pattern><a href=”[IMAGE_URL]” ><img src=”[IMAGE_THUMB]” /></a></Pattern>
</ExportOption>
Color Detection Algorithm
11 Sep 2008 1 Comment
in C#
Ever wonder how to check if a certain color still belongs to a certain family?
Like if you check if the current color is still part of Red,Green,Blue etc?
You can achieve it by using color distance formula and based on a tolerance.
basically you pass in 2 RGB values and it will return the distance of both colors which you can used as a tolerance.
Code below is in c# and I used it as part of my pixel detection algorithm for my Bot:
{
double val;
double rx = Math.Abs(((double)r1-(double)r2));
double gx = Math.Abs(((double)g1-(double)g2));
double bx = Math.Abs(((double)b1-(double)b2));
val =Math.Sqrt(rx*rx + gx*gx + bx*bx );
return val;
}



