picasa thumbnail sizes

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

picasa thumbnail sizes

Danny Guerrier
This is a two part question

First when creating a web album in using the web interface at picasaweb how do I specify alternate thumbnail sizes?

secondly how do I specify which thumbnail to retrieve using gdata. 

getThumbNail returns a default 160 x 160 thumbnail image.

Array
(
    [0] => Zend_Gdata_Media_Extension_MediaThumbnail Object
        (
            [_rootElement:protected] => thumbnail
            [_rootNamespace:protected] => media
            [_url:protected] => http://lh4.ggpht.com/_kgbOXjplOtk/S-tnFyvWkeE/AAAAAAAAAhE/yK_uRdDVjJ8/s160-c/NothingButTheMostFly.jpg
            [_width:protected] => 160
            [_height:protected] => 160
            [_time:protected] => 
            [_rootNamespaceURI:protected] => 
            [_extensionElements:protected] => Array
                (
                )

            [_extensionAttributes:protected] => Array
                (
                )

            [_text:protected] => 
            [_namespaces:protected] => Array
                (
                    [atom] => Array
                        (
                            [1] => Array
                                (
                                    [0] => http://www.w3.org/2005/Atom
                                )

                        )

                    [app] => Array
                        (
                            [1] => Array
                                (
                                    [0] => http://purl.org/atom/app#
                                )

                            [2] => Array
                                (
                                    [0] => http://www.w3.org/2007/app
                                )

                        )

                    [media] => Array
                        (
                            [1] => Array
                                (
                                    [0] => http://search.yahoo.com/mrss/
                                )

                        )

                    [gd] => Array
                        (
                            [1] => Array
                                (
                                    [0] => http://schemas.google.com/g/2005
                                )

                        )

                    [openSearch] => Array
                        (
                            [1] => Array
                                (
                                    [0] => http://a9.com/-/spec/opensearchrss/1.0/
                                )

                            [2] => Array
                                (
                                    [0] => http://a9.com/-/spec/opensearch/1.1/
                                )

                        )

                    [rss] => Array
                        (
                            [1] => Array
                                (
                                    [0] => http://blogs.law.harvard.edu/tech/rss
                                )

                        )

                )

        )

)

Reply | Threaded
Open this post in threaded view
|

Re: picasa thumbnail sizes

Ryan Boyd-3
All thumbnail sizes are created when the photo is uploaded.  

The thumbsize query parameter determines what thumbnails are returned in the feed being fetched:

Cheers,
-Ryan



On Sun, Jun 6, 2010 at 8:00 AM, Danny Guerrier <[hidden email]> wrote:
This is a two part question

First when creating a web album in using the web interface at picasaweb how do I specify alternate thumbnail sizes?

secondly how do I specify which thumbnail to retrieve using gdata. 

getThumbNail returns a default 160 x 160 thumbnail image.

Array
(
    [0] => Zend_Gdata_Media_Extension_MediaThumbnail Object
        (
            [_rootElement:protected] => thumbnail
            [_rootNamespace:protected] => media
            [_url:protected] => http://lh4.ggpht.com/_kgbOXjplOtk/S-tnFyvWkeE/AAAAAAAAAhE/yK_uRdDVjJ8/s160-c/NothingButTheMostFly.jpg
            [_width:protected] => 160
            [_height:protected] => 160
            [_time:protected] => 
            [_rootNamespaceURI:protected] => 
            [_extensionElements:protected] => Array
                (
                )

            [_extensionAttributes:protected] => Array
                (
                )

            [_text:protected] => 
            [_namespaces:protected] => Array
                (
                    [atom] => Array
                        (
                            [1] => Array
                                (
                                    [0] => http://www.w3.org/2005/Atom
                                )

                        )

                    [app] => Array
                        (
                            [1] => Array
                                (
                                    [0] => http://purl.org/atom/app#
                                )

                            [2] => Array
                                (
                                    [0] => http://www.w3.org/2007/app
                                )

                        )

                    [media] => Array
                        (
                            [1] => Array
                                (
                                    [0] => http://search.yahoo.com/mrss/
                                )

                        )

                    [gd] => Array
                        (
                            [1] => Array
                                (
                                    [0] => http://schemas.google.com/g/2005
                                )

                        )

                    [openSearch] => Array
                        (
                            [1] => Array
                                (
                                    [0] => http://a9.com/-/spec/opensearchrss/1.0/
                                )

                            [2] => Array
                                (
                                    [0] => http://a9.com/-/spec/opensearch/1.1/
                                )

                        )

                    [rss] => Array
                        (
                            [1] => Array
                                (
                                    [0] => http://blogs.law.harvard.edu/tech/rss
                                )

                        )

                )

        )

)


Reply | Threaded
Open this post in threaded view
|

Re: picasa thumbnail sizes

Danny Guerrier
               $query = new Zend_Gdata_Photos_UserQuery();
               $query->setKind('album');

                $userFeed = $this->photoService->getUserFeed(null, $query);


         foreach ($userFeed as $feed){
              if ($feed instanceof Zend_Gdata_Photos_AlbumEntry){

                   $thumb =  $feed->getMediaGroup()->getThumbNail();
                    $album->thumbnail = $thumb[0]->getUrl();
              }
          }

I have the above code that gets the album thumbnails but it always gives me 160x160
So how would i access the other album thumbnails in code.  I don't see a to set the desired size or get a specific size from the returned feed.

On Sun, Jun 6, 2010 at 11:23 AM, Ryan Boyd <[hidden email]> wrote:
All thumbnail sizes are created when the photo is uploaded.  

The thumbsize query parameter determines what thumbnails are returned in the feed being fetched:

Cheers,
-Ryan



On Sun, Jun 6, 2010 at 8:00 AM, Danny Guerrier <[hidden email]> wrote:
This is a two part question

First when creating a web album in using the web interface at picasaweb how do I specify alternate thumbnail sizes?

secondly how do I specify which thumbnail to retrieve using gdata. 

getThumbNail returns a default 160 x 160 thumbnail image.

Array
(
    [0] => Zend_Gdata_Media_Extension_MediaThumbnail Object
        (
            [_rootElement:protected] => thumbnail
            [_rootNamespace:protected] => media
            [_url:protected] => http://lh4.ggpht.com/_kgbOXjplOtk/S-tnFyvWkeE/AAAAAAAAAhE/yK_uRdDVjJ8/s160-c/NothingButTheMostFly.jpg
            [_width:protected] => 160
            [_height:protected] => 160
            [_time:protected] => 
            [_rootNamespaceURI:protected] => 
            [_extensionElements:protected] => Array
                (
                )

            [_extensionAttributes:protected] => Array
                (
                )

            [_text:protected] => 
            [_namespaces:protected] => Array
                (
                    [atom] => Array
                        (
                            [1] => Array
                                (
                                    [0] => http://www.w3.org/2005/Atom
                                )

                        )

                    [app] => Array
                        (
                            [1] => Array
                                (
                                    [0] => http://purl.org/atom/app#
                                )

                            [2] => Array
                                (
                                    [0] => http://www.w3.org/2007/app
                                )

                        )

                    [media] => Array
                        (
                            [1] => Array
                                (
                                    [0] => http://search.yahoo.com/mrss/
                                )

                        )

                    [gd] => Array
                        (
                            [1] => Array
                                (
                                    [0] => http://schemas.google.com/g/2005
                                )

                        )

                    [openSearch] => Array
                        (
                            [1] => Array
                                (
                                    [0] => http://a9.com/-/spec/opensearchrss/1.0/
                                )

                            [2] => Array
                                (
                                    [0] => http://a9.com/-/spec/opensearch/1.1/
                                )

                        )

                    [rss] => Array
                        (
                            [1] => Array
                                (
                                    [0] => http://blogs.law.harvard.edu/tech/rss
                                )

                        )

                )

        )

)



Reply | Threaded
Open this post in threaded view
|

Re: picasa thumbnail sizes

Ryan Boyd-3
The others aren't in the feed unless you ask for them.  To ask for them, you need to modify the query URL-- which you can do using the $query instance you have in your code.  Call $query->setThumbsize('32,48,64'); etc before your retrieve the feed if you want to have the MediaThumbnail elements returned for multiple sizes.

The valid list is:
32, 48, 64, 72, 104, 144, 150, 160

If you include more than one, make it comma-delineated. 

Cheers,
-Ryan


On Sun, Jun 6, 2010 at 8:32 AM, Danny Guerrier <[hidden email]> wrote:
               $query = new Zend_Gdata_Photos_UserQuery();
               $query->setKind('album');

                $userFeed = $this->photoService->getUserFeed(null, $query);


         foreach ($userFeed as $feed){
              if ($feed instanceof Zend_Gdata_Photos_AlbumEntry){

                   $thumb =  $feed->getMediaGroup()->getThumbNail();
                    $album->thumbnail = $thumb[0]->getUrl();
              }
          }

I have the above code that gets the album thumbnails but it always gives me 160x160
So how would i access the other album thumbnails in code.  I don't see a to set the desired size or get a specific size from the returned feed.

On Sun, Jun 6, 2010 at 11:23 AM, Ryan Boyd <[hidden email]> wrote:
All thumbnail sizes are created when the photo is uploaded.  

The thumbsize query parameter determines what thumbnails are returned in the feed being fetched:

Cheers,
-Ryan



On Sun, Jun 6, 2010 at 8:00 AM, Danny Guerrier <[hidden email]> wrote:
This is a two part question

First when creating a web album in using the web interface at picasaweb how do I specify alternate thumbnail sizes?

secondly how do I specify which thumbnail to retrieve using gdata. 

getThumbNail returns a default 160 x 160 thumbnail image.

Array
(
    [0] => Zend_Gdata_Media_Extension_MediaThumbnail Object
        (
            [_rootElement:protected] => thumbnail
            [_rootNamespace:protected] => media
            [_url:protected] => http://lh4.ggpht.com/_kgbOXjplOtk/S-tnFyvWkeE/AAAAAAAAAhE/yK_uRdDVjJ8/s160-c/NothingButTheMostFly.jpg
            [_width:protected] => 160
            [_height:protected] => 160
            [_time:protected] => 
            [_rootNamespaceURI:protected] => 
            [_extensionElements:protected] => Array
                (
                )

            [_extensionAttributes:protected] => Array
                (
                )

            [_text:protected] => 
            [_namespaces:protected] => Array
                (
                    [atom] => Array
                        (
                            [1] => Array
                                (
                                    [0] => http://www.w3.org/2005/Atom
                                )

                        )

                    [app] => Array
                        (
                            [1] => Array
                                (
                                    [0] => http://purl.org/atom/app#
                                )

                            [2] => Array
                                (
                                    [0] => http://www.w3.org/2007/app
                                )

                        )

                    [media] => Array
                        (
                            [1] => Array
                                (
                                    [0] => http://search.yahoo.com/mrss/
                                )

                        )

                    [gd] => Array
                        (
                            [1] => Array
                                (
                                    [0] => http://schemas.google.com/g/2005
                                )

                        )

                    [openSearch] => Array
                        (
                            [1] => Array
                                (
                                    [0] => http://a9.com/-/spec/opensearchrss/1.0/
                                )

                            [2] => Array
                                (
                                    [0] => http://a9.com/-/spec/opensearch/1.1/
                                )

                        )

                    [rss] => Array
                        (
                            [1] => Array
                                (
                                    [0] => http://blogs.law.harvard.edu/tech/rss
                                )

                        )

                )

        )

)