It’s been so long since I last wrote… My previous post was about the directory object dialog that I implemented in my framework. My plan was to use it for something, and that something is finally here. It’s a tool that you can use to save photos for accounts in active directory and retrieve them. I also set up a new project on Google named Joco Tools. That is because I’m planning on releasing a lot more useful stuff here.
It’s been almost ready for some months now, but I got really overwhelmed with other stuff. A year ago I wrote about the Windows user tile API, my final plan is to have tools to automatically manage photos in active directory (including cropping and resizing them), also from the command line, and use them as Windows account pictures. Enough of the introduction, let’s see what it is.
Here’s a screenshot to the right. Using it couldn’t be any more simple. You click the Select button to find an object in active directory. On the left you see a list of existing and possible attributes (more on them below). Existing means that it contains a picture and if you select it, you can view it instantly and also save, delete or replace it. Possible means that active directory supports inserting a picture but it doesn’t exist yet so you can import a picture there. (And no kidding, this is the actual photo of the domain administrator account that I set up at my company.)
Let’s see what’s under the hood. As you might have guessed, the Select button invokes the managed directory object picker dialog that I created in my framework and mentioned above. The whole app is WPF-based, and I’m very proud of that because it’s my first actual WPF application. I’ve known WPF for quite some time, and I’ve developed an app in Silverlight, but just haven’t had the opportunity to use WPF for something usable until now. Another interesting piece is the generic usage of image codecs. Sadly, WPF lacks some aspects that I needed so I implemented it in my framework, source code is in BitmapCodec.cs. It’s not a big piece of code, but it is cool stuff.
Currently it supports two attributes. One of them is thumbnailPhoto. Most importantly, it is supported by Outlook 2010 out of the box (this is the first blog post I saw about it), and possibly other programs as well. The recommended dimensions are 96×96, and they say it should be 10 kilobytes (or kibibytes?) at most. It might be GIF but JPEG is the most common. The other attribute is jpegPhoto. Unlike the former, it is multi-valued, which my program supports perfectly. As I mentioned in my other post, the Windows user tile should be 126×126, so it would be a bad idea to use the thumbnailPhoto for that purpose. This is why we use the jpegPhoto to store the user tile at my company.
The app comes with a configuration file that specifies the AD attributes it can use. Currently it only specifies if an attribute is multi-valued or not. This is a precursor to the future developments, where it will also specify format, size and dimension requirements.
Why is it better than other tools which do the same thing? It is free and open source, looks nice (thanks to WPF), supports most kinds of accounts, not just users, and it just works (I hope ). And I’m planning to add more features, as I mentioned above (cropping, resizing, command line, etc.), but seeing how busy I’ve been, no promises about the timeframe.
About the tools project. Just like my framework, the code is as clean and possible and is GPL v3 licensed. And, also just like my framework, I still haven’t set up a proper build and publish system, but at least I decided that I will host the downloads and everything on Google Code.
Visit the project page to download. Feedback appreciated!