free hit counter August 2004 - Posts - Nauman Leghari's Blog

August 2004 - Posts

"The Mobile Phone Directory is a free resource intended to appeal to everyone interested in mobile phone communications, providing information about all aspects of mobile telecommunications from the history of the mobile phone through to today's technological gadgets. So, whether you are planning to buy a mobile phone, are puzzled by what the jargon means, or are merely curious about the issues involved, then you will find something on our website to interest you. The site is divided into four sections: Glossary of terms, Technology, Phones, and News."

through Russ []

Similar directories, but not all softwares are opensource or free.

I realized recently that it is much easier to browse source code with Reflector than with Visual Studio.NET itself.

Have you seen this cool video from MSR?

Summary: Michael Cohen and his colleagues from the Microsoft Research Team have invented a way to turn digital video into an animated cartoon. They've also developed techniques to combine animation with a still picture. Pixels in a video can be thought of as lying in six dimensional space - two image axes, time, and three color components. Pixels close to each other in this "space" form denser regions. The program clusters the pixels into a 3D shape, which can then be 'sliced' as though you were taking a slice of time and space.
From Only4Gurus

Screen Annotator is a Tablet PC utility which lets you capture a screen shot and then put your comments on the picture. You can also save the entire screen or part of it with your comments in your favourite image file format and share it with others.


There are two options when you have to save an image with Ink
a) Either save the image by manually serializing it and then adding it to the Ink object using Ink.ExtendedProperties.Add(...) . By doing this, you can't send the file to anyone not able to read the file.
b) Output a file using common image formats (i.e. jpg,gif, ... )

For more information about the first method, read Saving and Loading Ink on InkPicture Control in C# or the classic book Building Tablet PC Applications.

For using the second method, you need to play with GDI+ objects. For future reference and for those who need to implement this functionality, here is the code snippet.

I assume that you have a global “Bitmap” object, which holds the InkPicture's image ( or you can get it anyway )

        private void SavePicture()
            if (saveFileDialog1.ShowDialog() == DialogResult.OK)
                string filename = saveFileDialog1.FileName;
                ImageFormat imgFmt = GetImageFormat(filename);

                // create graphics object from the bitmap
                Bitmap b2 = new Bitmap(deskImage);
                Graphics g1 = Graphics.FromImage(b2);

                // make a renderer to draw ink on the graphics surface
                Renderer r = new Renderer();
                r.Draw(g1, inkPicture1.Ink.Strokes);              
                b2.Save(filename, imgFmt);

The GetImageFormat( ) method

        private ImageFormat GetImageFormat(string filename)
            string ext = Path.GetExtension(filename);

            ImageFormat imgFmt = null;

                case ".jpg":
                    imgFmt = ImageFormat.Jpeg;
                case ".gif":
                    imgFmt = ImageFormat.Gif;
                case ".bmp":
                    imgFmt = ImageFormat.Jpeg;
                    imgFmt = ImageFormat.Jpeg;
                    filename += ".jpg";

            return imgFmt;

Update: It may not be the only method so if you know any other way to do this, please leave your comments. Thanks.

More Posts