2006-06-27

The world is yours

I just finished watching Scarface, and I'm very impressed. I always thought Al Pacino was a great actor, but I had never seen any of his earlier work. This just adds a whole new perspective. The movie is strong and violent. It shows the other side of the American dream, it shows what power and greed can do to a guy.

2006-06-24

Belgian government chooses OpenDocument

I've just read that the Belgian government chooses OpenDocument as the standard format for exchanging documents within the government. They are however leaving the door open for Microsoft's Open XML, waiting for applications that support it. I hope they will accept OpenXML. I think it's a great file format, and it's just as open as ODF.

2006-06-12

Reading an image from a file without locking it

When you use Image.FromFile to read an image from a file, the file is locked. The following method reads an image from a file without locking it:
public static class Utils
{
    public static Image ImageFromFile(string fileName)
    {
        if (fileName == null) throw new ArgumentNullException("fileName");

        using(FileStream lStream = new FileStream(fileName, FileMode.Open, FileAccess.Read))
            return Image.FromStream(lStream);
    }
}
Here's an example how to use it:
// old method that locks the file:
Image img = Image.FromFile("picture.jpg");
// new method that does not lock the file:
Image img = Utils.ImageFromFile("picture.jpg");
Tags: .

2006-06-10

Calctor 1.3

I've updated my calculator tool to version 1.3: If you can think of useful templates to put in the Templates directory, just let me know.
You can download it from the Sandbox at Channel 9.

2006-06-03

Calctor 1.2

I've updated my calculator tool to version 1.2: If you can think of useful templates to put in the Templates directory, just let me know.
You can download it from the Sandbox at Channel 9.