Official blog for the Windows Live Digital Memories
This is a guest post from Omar Shahine. When we announced an internal beta of our new Publish API a few months ago he jumped right on it and within a few days built his Smugmug plug-in. If you’re a Photo Gallery user that also happens to use Smugmug to share photos AND videos, then this plug-in is for you! Check out the plug-ins download page (more plug-ins are coming soon). Anyway, enjoy Omar’s perspective. –Michael Palermiti
Hi There! My name is Omar Shahine and I’m a Program Manager on the Hotmail team. I also happen to be a photography enthusiast and long time reader of this blog. The Photo Gallery team asked if I’d blog about my experience building a Publish Plug-in for SmugMug, my photo sharing service of choice. [download Publish on SmugMug]
Let me start out by saying that I’ve already authored an uploader for SmugMug called Send to SmugMug. This is a .NET program that I wrote many years back to simplify and streamline uploading pictures from the Windows Shell to SmugMug. It’s gotten popular over the years and I’ve added lots of features. Send to SmugMug was originally written for Windows XP, which seems like a long time ago for me.
Why author a Plug-in?
When Windows Live Photo Gallery was released last year I started to use it for all my photo management. Both my wife and I feel it’s the easiest product to tag, rate, and organize our photos. We have over 30,000 pictures right now and since having our first child almost 2 years ago we take a LOT of pictures and upload to them to SmugMug to share with our friends and family. In fact, we’ve developed an interesting workflow. My wife and I rate all our photos and anything with a 3 star or higher rating gets uploaded. Things with 2 star ratings we keep, but don’t share or play through our slideshow screensaver on our TV powered by Windows Media Center.
Our basic philosophy on ratings is to use the pyramid system (where there are very few 5 star, and very many 3 and 2 star):
Why am I telling you this? Well Photo Gallery lets you easily view and filter by rating so uploading pictures with 3 stars or higher is as simple as clicking a button to filter and then publishing, something not possible in the Windows Shell.
Since we use Photo Gallery a lot, it got to be inconvenient for us to keep having to use the Windows Shell and Send to SmugMug to upload our photos. So when the Publish Plug-in SDK was sent my way a few months ago, you can imagine how excited I was to start writing some code :-).
Authoring a Plug-in
You might wonder how long it took me to write the Publish on SmugMug Plug-in. Not long. All in all I would say I spent 3 days working on the plug-in. The first day was mainly downloading and examining the Sample Flickr Plug-in and setting up my project in Visual Studio 2008. I spent the next day writing code and creating the installer. On the third day I created an auto-update feature and created the web pages and such to host my Plug-in.
Of course one thing that helped me tremendously was that I already had a bunch of code that talked to SmugMug using their API. If you are starting from scratch and have no code at all to talk to a publishing service it could take longer.
What Publish on SmugMug does
It’s pretty simple really. Much simpler than the Flickr Plug-in (due to the differences between Flickr an SmugMug).
1. You select a photo, or video, or combination of any number of them.
2. You then select Publish on SmugMug… from the Publish Menu
3. You are asked for your username and password for SmugMug
4. You then select a Gallery to upload to, or create a new one:
5. You then click Publish
You can then click View to be taken to the uploaded Photo or Gallery.
How I wrote Publish on SmugMug
If you are like me, then there is only one thing you need to figure this out. Just download the Sample Flickr Plug-in and start messing around! I didn’t read any of the SDK docs, although they are there if you need them. The overview doc is a good place to get an understanding of what you need to know if you have to see flow diagrams before looking at sample code.
The basic idea for any Publish plug-in is going to be:
What I did was:
The only interesting issues I ran into writing my plug-in were:
That’s it! I hope you enjoy Publish on SmugMug or creating your own Publish Plug-in.
Omar Shahine, Lead Program Manager on Hotmail