How to download the largest available (eg. original) version of a Picasa (or Google+) photo from a web album

The Picasa Web Albums Data API Reference Guide tells you all about how to retrieve data of photos and albums (from Picasa Web Albums or Google+ photo albums). There're two feeds available:
Both accept a number of query parameters, one of them is imgmax. If you specify the value d for this parameter, then the list returned by the URL will contain URLs to the original images (or the largest available version of the images, if the originals are not accessible to you).

If you're using linux, install either xmllint or XMLStarlet. Both let you execute XPath queries against an XML document. Using the latter, you can easily retrieve all image URLs with this one-liner:
xml sel -t -v '//media:content/@url' your_picasa_feed_document.xml > image_urls.txt
And using wget you can easily download them:
wget -i image_urls.txt

To download all images from an album, you can use this script:
IFS='
'
idx=1
for url in $(wget -q -O - --no-check-certificate 'https://picasaweb.google.com/data/feed/api/user/userID/albumid/albumID?imgmax=d&max-results=1000' | xmlstarlet sel -t -v "/*[local-name() = 'feed']/*[local-name() = 'entry']/*[local-name() = 'content']/@src"); do
  f_src="$(echo "$url" | sed -r 's/.*\/([^/]+)$/\1/')"
  [ -n "$f_src" ] && wget -O "$(printf "%04d" "$idx")_${f_src}" "$url"
  idx="$((idx+1))"
done

Or this one if you only have xmllint available:
IFS='
'
idx=1
for url in $(wget -q -O - --no-check-certificate 'https://picasaweb.google.com/data/feed/api/user/userID/albumid/albumID?imgmax=d&max-results=1000' | xmllint --xpath "/*[local-name() = 'feed']/*[local-name() = 'entry']/*[local-name() = 'content']/@src" - | sed -r 's/ src="([^"]+)"/\n\1/g'); do
  f_src="$(echo "$url" | sed -r 's/.*\/([^/]+)$/\1/')"
  [ -n "$f_src" ] && wget -O "$(printf "%04d" "$idx")_${f_src}" "$url"
  idx="$((idx+1))"
done