4

Does anyone know if there is a way to get a list of all of the image sizes that picasa is hosting?

I've been using google's gdata java library for picasa, and I'm able to get a list of thumbnails ranging in size (3 in all of the cases that I've seen), and the full, original posted image - all from the PhotoEntry object.

However, I notice that when you browse picasaweb.google.com, it also has a large, but possibly not full size image that's suitable for displaying on screen. For example, an image loaded at 1600x1200 has another image at: 912x684. But this image doesn't appear anywhere PhotoEntry (or in the underlying feed XML - at least for the way I'm querying).

I notice that the url is almost the same (but introduces 's912' indicating the size), e.g.:

http://lh5.ggpht.com/_0WaNZR9hJtU/Sq0P86tsVdI/AAAAAAAAAIo/6fGDYaO--Eg/s912/P1030046.JPG

With enough examples, I could probably guess the generated sizes, and hack the url. But I'm hoping that there are other ideas - or that I'm overlooking something easy. Probably should post to a Google forum, but this site is more fun.

Scott A Miller
  • 696
  • 5
  • 9
  • I have discovered a partial solution: you can specify a maximum image size in the query url (e.g.): http://picasaweb.google.com/data/feed/api/user/picasa.username?kind=photo&imgmax=800 Obviously, doesn't help determine available sized, but at least prevents an image from being too large, which is workable. Still open to other ideas. – Scott A Miller Sep 23 '09 at 01:56

2 Answers2

7

Adding /s734/ which scales either the height or width to the target size. To scale a specific length use /w734/ for width or /h392/ for height in the url before the image filename. This will actually reduce the image to that size before serving the file. Providing a size request larger than the original image's dimensions results in a 404 not found error.

There is also an option for cropping used like this with a -c flag /w990-h600-c/ and it crops from the center of the image, not from (0,0).

Three examples

http://lh5.ggpht.com/-qSvxHEfhPw0/TiCYX-sJn9I/AAAAAAAAIm4/hzzJBdm0sM8/w231/IMG_2058.JPG
http://lh5.ggpht.com/-qSvxHEfhPw0/TiCYX-sJn9I/AAAAAAAAIm4/hzzJBdm0sM8/h300-w300-c/IMG_2058.JPG
http://lh5.ggpht.com/-qSvxHEfhPw0/TiCYX-sJn9I/AAAAAAAAIm4/hzzJBdm0sM8/s231/IMG_2058.JPG
Dylan Valade
  • 5,565
  • 6
  • 42
  • 56
  • I'm having trouble finding where these parameters are documented. Also, it seems `-c` only works for square thumbnails, and if height and width are individually specified and are different, the resulting image sometimes is of an entirely different height and width, such as this example: http://lh6.ggpht.com/-sQmxI10yRpk/TieiIRP1NBI/AAAAAAAAIow/hUCnMAPfpZA/w585-h100-c/DSC_6313.JPG – Charlie Gorichanaz Oct 13 '12 at 07:55
  • 1
    @CharlieGorichanaz I couldn't find any documentation from Google either. I simply tried every alpha character as parameters and then compared resulting file sizes and dimensions. You're right, there seemed to be inconsistency with -c flag with rectangular images. – Dylan Valade Oct 14 '12 at 15:20
5

The uncropped generated sizes are:

94, 110, 128, 200, 220, 288, 320, 400, 512, 576, 640, 720, 800, 912, 1024, 1152, 1280, 1440, 1600

More info can be found in the section titled "Picasa Web Albums query parameters reference" at http://code.google.com/apis/picasaweb/docs/2.0/reference.html

kcintrab
  • 386
  • 3
  • 5