duanluanlang8501 2012-04-12 14:52
浏览 37

如何使用Gdata从Picasa获取实际图像

I am trying to output the actual URL to the high resolution image of a photoentry. A photo entry Zend_Gdata_Photos_PhotoEntry of the Gdata contains the data of photo stored in Picasa.

Currently, I found to methods to output URLs to images. The first is to output thumb images, they seem to be available in three different sizes. The second method is by getContent(). I expected that this method should get me the highest resolution URL. Instead, it contains one image url which is still smaller than the original in Picasa.

    $thumb = $entry->getMediaGroup()->getThumbnail();
    $content = $entry->getMediaGroup()->getContent();

    echo "<img src='" . $content[0]->getUrl() . "' />";      
    echo "<img src='" . $thumb[1]->getUrl() . "' />";     
  • 写回答

3条回答 默认 最新

  • dongzhuang6247 2012-04-14 19:59
    关注

    same question here

    Outside of the php / zend aspect, it can help to understand the underlying abstract protocol for gdata/ picasa. I assume your provider for photos is picasa..

    Regardless of the language that you are writing in, you can use generic tools like the playground in order to make tests exercising the protocol and to further understand all the aspects of the back and forth of the API you are trying to use.

    The hi-res picture is in media:group/media:content[@url]

    The other link has a long answer that shows how to do a GET against the api for a particular user/ album/ photo and how to find the tag containing the URL that you want.

    评论

报告相同问题?

悬赏问题

  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line