Feeds:
Posts
Comments

Posts Tagged ‘utility’

As an amateur photographer, I have always kept my eyes open for new tools to help me search, sort, filter, and view my own photos. Microsoft Pivot (a cool new technology that lets you easily view, search, and filter data using deep zoom) seemed like a natural and obvious fit for the task.

Therefore, using Microsoft Pivot and the Pauthor open source libraries, I created  a tool that helps users create a pivot collection from the photos on their hard drive and supports filtering by all the nifty meta data embedded in those files such as shutter speed, aperture, film speed, and focal length. Plus, users end up with a great look set of deep zoom images from their photo collection!

How:

Step 1: Install Microsoft Pivot

Step 2: Install PhotoPivot beta (I’m calling it a beta because I wrote it in about 8 hours).

image

Browse for the folder containing the photos that you would like to “Pivot-ize”

Browse for the location where you would like to dump the pivot collection and all the associated deep zoom files.

Note: This can take up a lot of space

Click “Go”

Warning: If you run this on a couple hundred high resolution photos it will take ~5-10 minutes, if you run it on all 20,000 photos in your My Pictures folder… do it before you go to bed!

The Result:

In the end, assuming Microsoft Pivot is installed, it will launch the Pivot app and automatically load your collection…

image

Highlights:

  1. The end result is awesome… especially when it’s your own photos that you’re filtering and deep zooming on.
  2. This collection is totally compatible with the Microsoft Silverlight PivotViewer control which makes it super easy to publish the result on the web. All you have to do is upload the output to a web server, toss a clientconfigpolicy.xml file in the domain’s root and build a 3 minute Silverlight PivotViewer app to view them. Read my earlier blog post for more details. The only down-side: if you thought it took a long time to generate the files, wait until you try to upload them; yikes!
  3. Source code is available. Knock yourself out!

Kudos:

  • Microsoft Pivot. Seriously folks, this is where all the real work was done.
  • DeepZoom. It wouldn’t be nearly as cool without it.
  • Pauthor. And without this awesome open source library, I would never have bothered to build this. (It even uses parallel processing to generates all the deep zoom images). Great work guys!
Advertisement

Read Full Post »

ASP.NET allows you to get at some great information about the client and the server via the HttpContext.Current.Request.ServerVariables collection. Likewise, Silverlight allows you to get at a few local variables of its own through the System.Windows.Browser.HtmlPage.BrowserInformation object.

But, to use these variables we often need to know what kind of values to expect. For example, let’s say you’re going to create a condition based on which browser the user is using. You would use BrowserInformation.Name. But Name is a string, not an enum. So what are the various values that can be returned by this property? This might be documented somewhere for the officialy supported browsers, but the only fool proof way is to actually try it by writing a dummy Silverlight app that spills out this variable and run it in all the different browsers to see what comes back. The same applies to ServerVariables but even more so because this is just a big dictionary so you don’t even know which variables are going to be present let alone what their values will be.

Here’s a utility I wrote for anyone to use that will help you look at all the BrowserInfo properties and ServerVariables. Hit this page from any machine to see what values it is sending up to the server. Bookmark this page, it will probalby come in handy someday when you’re scratching your head wondering what useragent you’re sending up to the server.


BrowserInfo and ServerVariables

Another cool part is that it not only shows you what servervariables are available at the time your web page is requested, but also what servervariables are available when you hit a WCF service from Silverlight. There are some subtle differences.

Also note that it’s hosted on Azure so you can also get a glimpse of which ServerVariables Azure provides access to. On first glance it looks the same as Windows Server but I haven’t done a variable by variable comparison.

Enjoy, I hope this comes in handy!

Download the source code here to see how it works or to host on your own server.

Read Full Post »

I always try to use named colors whenever I can because it makes your Xaml much easier to read! Who knows what color #1A37C5 is? Okay, so maybe some of you can “see into the matrix” but I’d much rather see something like “DarkBlue”. It’s also easier to write because you VS gives you IntelliType when entering a color for a property of type Brush or Color.

Here’s a super easy way to see all the named colors out there that Silverlight supports. This tool also supports copying the name by selecting it and using Ctrl+C. Plus, you can sort the list alphabetically, by red, blue, green, hue, saturation, or luminosity for those of us that get dizzy scanning the palette for a good “blue” to choose.

namedcolorsviewer
Click to Run

Note: Microsoft has a pretty good table of their own with all the same colors in my tool (there are 141 of them by the way, not 240 as stated on the MS site). But the colors blocks are smaller, it’s all just a big image so you can’t copy names, and it of course lacks my patented sort feature 😉

Read Full Post »

Need a way to duplicate a chunk of text for each variable in a list? This tool will save you time and soar wrists by letting you create a template and a list of variables and merge the two to get a repeated chunk of text with variables injected into each iteration.



Click To Run

For example, let’s say you had a list of 100 names of colors and you wanted to generate a function in code for each. Supply the list of colors as your “variables” and set your “template” to:

function #value#() { }

And let the TemplateRepeater take it away generating a chunk of text for each color resembling:

function blue() { }

function red() { }

function green() { }

Simple but surprisingly useful! Enjoy!

Read Full Post »