views:

829

answers:

2

Okay, it seems to be a stupid question, since we have this: http://code.google.com/intl/en/apis/picasaweb/docs/2.0/developers_guide_java.html

However, up to the moment, I can only succeed in displaying the thumbnails by using:

PhotoEntry photo = //somehow I get the instance
photo.getMediaThumbnails().get(0).getUrl()

The biggest photo I can display through this method is up to 300 pixel or so[which is photo.getMediaThumbnails().get(3)]. How can I display the a thumbnail up to 400 pixel or even 800 pixel? Or How can I even refer back to the google picasa page that can actually help me display this photo?

Thanks

+1  A: 

The following was answered by a community member of google picasa api:

Take a look at

http://code.google.com/apis/picasaweb/docs/2.0/reference.html#Parameters

It explains how you can control the size of the image that the media:content link points to as well as how you can request different thumbsizes for the media:thumbnail links. Also listed are the valid size values available. Note though, that you can only access images up to 800px in size (width or height, whatever is larger) from websites.

For instance:

GET /feed/api/user//albumid/? kind=photo&imgmax=800&thumbsize=512,400,160c

will give you a link to an 800px version in the media:content link, a link to the uncropped 512px and 400px version in the first two media:thumbnail elements and a square-cropped 160x160 thumbnail in the third thumbnail element.

Cheers, Detlev

Winston Chen
A: 

Quite Simple

 PhotoEntry photo = //somehow I get the instance
    photo.getMediaThumbnails().get(0).getUrl()

You can use this way to get that 400/800px photo.

You only have to change the result URL that is given. Change the s144/s400/s800 value of the URL

BLAH com/_BwderBVv7wg/XXXXXXXX/AAAAAAAAAME/HdXja0HclK0/s72/DSC09176.JPG BLAH com/_BwderBVv7wg/XXXXXXXXX/AAAAAAAAAME/HdXja0HclK0/s144/DSC09176.JPG BLAH com/_BwderBVv7wg/XXXXXXXXX/AAAAAAAAAME/HdXja0HclK0/s288/DSC09176.JPG BLAH com/_BwderBVv7wg/XXXXXXXXX/AAAAAAAAAME/HdXja0HclK0/s400/DSC09176.JPG BLAH com/_BwderBVv7wg/XXXXXXXXX/AAAAAAAAAME/HdXja0HclK0/s800/DSC09176.JPG

Daxon