Media RSS (MRSS) is an XML format which extends the RSS format. By using this format, a website can be enabled to provide rich media functionality. This can be used for images, audio and video. This entry discusses enabling Media RSS for images. Video is very easy to implement, but will not be discussed here. By using PicLens in Firefox, the result looks like below. It is very fast, full screen, and has nice facilities to scroll around the images, zoom in and out and other such things. Here I will discuss a simple implementation, and you can scroll below to download a small .NET application to automate this process. If you already have a Media RSS viewing application, then check out an example of the output (Note, copyright links were added after the page was generated).
The Media RSS format is very simple, it only requires the addition of two namespaces to an RSS feed, and two elements within that namespace. The namespaces are:xmlns:atom="http://www.w3.org/2005/Atom"xmlns:media=http://search.yahoo.com/mrss/The elements that need to be added are: <media:thumbnail url="path_to_image_thumbnail" /><media:content url="path_to_image" />
The URL's can should be absolute URL's to validate in feed validation systems, although it will still work if you use relative URL's. The thumbnail element should be used, but if you don't have a separate thumbnail image you can just point it at the same as the full size image. It would be worthwhile to use a thumbnail as you will save bandwidth and probably please your viewers with a more responsive experience.
The last thing to do is to include a link to the feed on the page where you want to display it. This points to the Media RSS feed you created earlier. The Media R
SS feed can exist anywhere in your site, just make sure you point to it in the page where you want the feed discovered.
<link rel="alternate" href="imagegallery\media.xml" type="application/rss+xml" />
To use the application, you need to start the application and do the following:
Once you click Make the gallery! all the necessary files will be created, and automatically displayed in internet Explorer. Note that the images will not work properly in PicLens if an URL was specified as the paths are absolute URL's. The files are now ready to upload to your web server.
Metadata is data describing something. In this case, describing the images. This metadata is extracted from the images themselves. If using Windows Vosta then this information is easily entered via Windows Explorer or the standard picture viewer application. On previous versions of Windows, you can download the Microsoft Pro Photo tools, a free download from the Microsoft site. If you have no metadata for your images, then the application will still generate a Media RSS file, but it is better to use some metadata.
PicLens WebMasters guideMicrosoft Pro Photo ToolsPowerSet Media RSS links
Source code (.NET) (89.9 KB)
Executable(140.5 KB)
Remember Me
a@href@title, b, em, i, strike, strong, u
© Copyright 2009 Mark Focas newtelligence dasBlog 2.2.8279.16125 | Page rendered at Wednesday, January 07, 2009 9:59:10 PM (AUS Eastern Daylight Time, UTC+11:00)