来自 Picasa 的较小图像

发布于 2024-08-05 09:48:10 字数 679 浏览 3 评论 0原文

有谁知道是否有办法获取 picasa 托管的所有图像尺寸列表?

我一直在为 picasa 使用 google 的 gdata java 库,并且我能够获得大小不等的缩略图列表(在我见过的所有情况下都是 3),以及完整的原始发布图像 - 全部来自PhotoEntry 对象。

但是,我注意到,当您浏览 picasaweb.google.com 时,它还有一个适合在屏幕上显示的大但可能不是全尺寸的图像。例如,加载的图像分辨率为 1600x1200,而另一图像的分辨率为:912x684。但该图像不会出现在 PhotoEntry 的任何位置(或在底层提要 XML 中 - 至少对于我查询的方式而言)。

我注意到网址几乎相同(但引入了“s912”表示大小),例如:

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

有了足够的例子,我可能会猜到生成的尺寸,并破解 url。但我希望还有其他想法——或者我忽略了一些简单的事情。也许应该发布到谷歌论坛,但这个网站更有趣。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

心意如水 2024-08-12 09:48:10

添加 /s734/ 将高度或宽度缩放到目标尺寸。要缩放特定长度,请在图像文件名之前的 URL 中使用 /w734/ 表示宽度,或使用 /h392/ 表示高度。这实际上会在提供文件之前将图像减小到该大小。提供大于原始图像尺寸的尺寸请求会导致 404 未找到错误。

还有一个与 -c 标志 /w990-h600-c/ 一起使用的裁剪选项,它从图像的中心裁剪,而不是从 (0 ,0)。

三个例子

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

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
微暖i 2024-08-12 09:48:10

未裁剪的生成尺寸为:

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

更多信息可以在标题为“Picasa 网络相册查询参数参考”的部分,位于 http://code。 google.com/apis/picasaweb/docs/2.0/reference.html

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文