Documenting Picasa

Providing documentation on Picasa and Picasa Web Albums - photo organization software and services from Google.

Tuesday, February 27, 2007

Flickr hits 400 million photos

Last Friday, 23rd Feb 2007, the Flickr uploaded photo counter hit 400 million with this otherwise unremarkable photo.

I previously looked at the growth of Flickr uploads by plotting uploads by Caterina Fake, to get a time series.  I've since found how to get a specific numbered photo by use of the Flickr API, so can now get dates for exact upload milestones.  The photos for each of the past 7 50 million milestones are:

The graph shows a remarkably straight line from 150 million through to 350 million, but that jump to 400 million is ahead of the curve - the rate of uploads has accelerated once again.  (Must be all those new cameras purchased over the holiday period!)

Friday, February 23, 2007

Picasa Web Albums feeds in JSON format directly

My previous post dealt with using Yahoo's Pipes service to reformat Picasa Web Album RSS feeds as JSON, which was largely just an excuse to try out that service.

However, it's been pointed out to me that Picasa Web Albums feeds can be got directly in JSON, without the need for third party assistance in this way - a fact I'd missed.

To get a Picasa feed as RSS, just append "&alt=json&callback=..." to the normal Picasa RSS request.  This isn't documented, but follows the documented conventions that a number of other Google provided feeds are now using.

The equivalent code snippet to match my previous example is

<script>

function output(data)
{

for (var i = 0; i < data.feed.entry.length; i++)
{
var item = data.feed.entry[i];

var title = item.title.$t;
var imageurl = item.media$group.media$thumbnail[0].url;
var description = item.media$group.media$description.$t;
var link = item.link[2].href;

document.writeln("<a href='" + link + "'><h2>" + title + "</h2><img src='" + imageurl + "'/></a><p>" + description + "</p>");
}

}
</script>

<script src="http://picasaweb.google.com/data/feed/base/user/documentingpicasa?category=album&alt=json&callback=output&access=public"></script>


Examples of people who have been using feeds in this way include:



Thanks to Haochi in the comments of my previous post.

Monday, February 19, 2007

Embedding Picasa Web Album galleries on your webpages

Picasa Web Albums offers some "cut and paste" code to display the album cover of a single album on your webpage.  However, I'm sure that many people would like to do more than this - such as automatically showing the covers of all the albums in their gallery at once.  Although that is possible via server side programming (making use of the the RSS feeds that PicasaWeb produces), not everyone has the ability to use such a server side solution.

However, with the aid of Yahoo's new "pipes" service, which allows easy manipulation of RSS feeds, and crucially allows the results to be output as JSON, it's possible to pull the data out of the the PicasaWeb RSS feed, and process it all on the client.

This may not be a fully polished solution (and the Pipes service can be very slow at times - taking a good number of seconds to run), but below is a proof of concept that the technique works.

Proof of concept

  1. First I produced a Pipe, that takes a PicasaWeb gallery name as an input parameter, and simply fetches the RSS feed for that gallery.
  2. I then request the pipe via a <script> tag on the page, crucially passing the additional parameters to format the data as JSON, and to make it call my own routine as a callback to process the data.
  3. Processing the data simply loops through the data, pulling out the album cover thumbnails, titles, and descriptions, and in this proof of concept displaying them in a very simple form

The code snippet comes out as this:

<script>

function output(data)
{

for (var i = 0; i < data.count; i++)
{
var item = data.value.items[i];

var title = item["media:group"]["media:title"].content;
var imageurl = item["media:group"]["media:thumbnail"].url;
var description = item["media:group"]["media:description"].content;
var link = item.link;

document.writeln("<a href='" + link + "'><h2>" + title + "</h2><img src='" + imageurl + "'/></a><p>" + description + "</p>");
}
}
</script>

<script src="http://pipes.yahoo.com/pipes/9HJi_gu42xGyw4mEdbq02Q/run?GalleryName=documentingpicasa&_render=json&_callback=output"></script>

Wednesday, February 14, 2007

Picasa build 36.19

Build 36.19 of Picasa is now available dated February 13, 2007

According to the release notes, the changes are:

  • Improved support for Vista.
  • Fixed a problem with Timeline and Slideshow on Vista Aero mode.
  • Improved reliability of uploading to Picasa Web Albums.
  • Updated icons.