Indeed. Not with the amount of bugs they deal on the daily basis :~
Andrew Kirillov
Posts
-
0x100 - Happy Programmer's Day -
0x100 - Happy Programmer's DayThose can celebrate Programmer's Eve the day before :laugh:
-
0x100 - Happy Programmer's DayToday is 256th day of the year! So congratulations to everyone on this Programmer's Day[^].
-
Extract Circle Features From ImageHello, When it comes to image processing tasks, I would say that it is much easier to discuss when there are few sample pictures available (if there are no some confidentiality restrictions of course). Talking about circles ... in some cases you can simplify things a lot by finding stand alone blobs/objects in a picture and then doing further shape analysis of those ...
With best regards, Andrew Kirillov AForge.NET
-
thinning algorithmHello, Did not run the C version of the algorithm you've pointed, but there are some already made implementation of thinning in C#, which are made in AForge.NET Framework[^]. One example is to use math morphology filters for this: [^]. Another is simple skeletonization filter[^].
With best regards, Andrew Kirillov AForge.NET
-
How to add the assemly to GACHello You need to use
gacutil.exe
for it.gacutil.exe /i <assembly_path>
With best regards, Andrew Kirillov, MCP x 3 Prize winner, August 2005
-
changing image formatHello Yes, you can use the above code to convert your image to 24bpp or 32bpp format (as you already know,
Image.Clone
does not produce this functionality, as it was expected). With 24bpp image you can use most of image processing filters.XeoN-Kc wrote:
I was observing this message board and found out the following code:
Yes, there is. Use
LockBits
. But, you will get troubles if you have color indexed image (like GIF). As you can see from my first article, I am using 24bpp format for color images, 8bpp indexed for grayscale images. Both formats I am processing usingLockBits
. And in the case of grayscale image it's rather obvious to implement brightness filter (the same logic as for 24bpp).XeoN-Kc wrote:
...Many thanks to Andy Kirillov
Oh, what is it ? :~ Who changed my name ? :mad: With best regards, Andrew Kirillov, MCP x 3 Prize winner, August 2005
-
Convert Uint32 to byte[4]Hello You can try the next code:
uint i = 0xABCDEF12; byte[] bytes = new byte[4] { (byte) (i & 0xFF), (byte) ((i >> 8) & 0xFF), (byte) ((i >> 16) & 0xFF), (byte) (i >> 24) };
With best regards, Andrew Kirillov, MCP x 3 Prize winner, August 2005 -
How to add right-click menu to a tree view controlHello You need to use
ContectMenu
property ofTreeView
. With best regards, Andrew Kirillov, MCP x 3 Prize winner, August 2005 -
I can't convert a var string to a var intHello May be you need to try this:
int.Parse( str )
or this:Convert.ToInt32( str )
With best regards, Andrew Kirillov, MCP x 3 Prize winner, August 2005 -
converting array of byte to string in c#Hello You use the next code:
byte[] bytes = new byte[] { 0x41, 0x42, 0x43, 0x44, 0x45 }; string str = System.Text.Encoding.ASCII.GetString( bytes ); System.Diagnostics.Debug.WriteLine( str );
With best regards, Andrew Kirillov, MCP x 3 Prize winner, August 2005
-
GDI+ ProblemoHello. You can use the next code:
// create new image with desired pixel format Bitmap bmp = new Bitmap(width, height, PixelFormat.Format32bppArgb); // draw source image on the new one using Graphics Graphics g = Graphics.FromImage(bmp); g.DrawImage(src, 0, 0, width, height); g.Dispose();
With best regards, Andrew
-
GDI+ ProblemoHello Why do you think your GIF image is 32-bit ? You can check the
PixelFormat
property and you will see, that it'sFormat8bppIndexed
. You can try to useImageLockMode.ReadOnly
mode or lock your image with PixelFormat.Format8bppIndexed or convert your image to 32-bit before (which will be useful if you are planning some image processing routines). With best regards, Andrew -
Can C# exist without dotnet??Hello Rahul.P.Menon wrote: 1) Is C# fully dependendent of DotNet. With out dotnet C# don't have any existance? Is it possible to produce eggs without chickens ? ;) No. C# is a .NET language, so any program written on C# requires .NET framework. Rahul.P.Menon wrote: 2)Without using dotnet frame work's compiler can we compile a C# program.Any other compiler is there to compile a C# program. You can try to look on Mono[^] project, which allows you to write C# application on Linux and Windows too. Rahul.P.Menon wrote: 3) Can we write stand alone programs in C# and compile? Do you mean which does not require .NET framework ? No again. Rahul.P.Menon wrote: 4)Can we develop any application using C# alone in notepad editor and without using dotnet(including dotnet frame work) You can write your application in any editor, even in notepad if you are masochist. But, no, you will not be able to compile it without .NET Framework. Rahul.P.Menon wrote: 5) What is the compiler compiles C# program in dotnet frame work?
csc.exe
With best regards, Andrew -
Webcam/ScannerHello, To capture from your webcam you can interop
Video for Windows
or to useDirectShow
(interop it or use managed extension of DirectX 9). You can find about interoping DirectX here on CP: http://www.codeproject.com/cs/media/directshownet.asp[^] And aboutVfW
on C#: http://www.codeproject.com/cs/media/aviFileWrapper.asp[^] You can also look at my article Motion Detection Algorithms[^]. This application is able to work with local capture devices. For working with scanner you should google or search here on CP, because the topic was already discussed. With best regards, Andrew -
Strange IL code from simple C# expressionWjousts wrote: Try this: .... In C# and C++ you should get "Five" as a result. Yes, I know. It will be the same in both languages. I was interested in original code I wrote. With best regards, Andrew
-
Strange IL code from simple C# expressionDave Kreskowiak wrote: C and C++ do the same thing. No ! I wrote it alredy. I've tested it with VS.NET 2003. C++ (managed and unmanaged) gives 6. With best regards, Andrew
-
Strange IL code from simple C# expression -
Strange IL code from simple C# expressionGreeeg wrote: It's actually the same with C(++), Not the same. I've checked on my VS 2003. With best regards, Andrew
-
Strange IL code from simple C# expressionAnonymous wrote: By the way, this is not just a C# thing, any C syntax language shoould behave this way (incl. java, javascript, C++ etc..) Yes, maybe other languages also should, but C++ produces 6. (managed and unmanaged versions). With best regards, Andrew