Where is the full size image in GData.Photos query?

前端 未结 2 767
傲寒
傲寒 2020-12-22 05:11

I am querying a Picasa gallery and when I dig into the entries that are returned, I can\'t find the full size image. I can only see a much smaller, re-sized image (da

2条回答
  •  执笔经年
    2020-12-22 06:00

    Hidden in the documentation it is possible to specify the size of the images in the feed. This is using the "imgmax" parameter:

    https://developers.google.com/picasa-web/docs/2.0/reference#Parameters

    Which can have a value set to "d" to request full sized images

    This is not supported directly in the c# API, but you can achieve the desired result using the "extraParameters" field on the PhotoQuery object.

    Your code then becomes:

    var picasaService = new PicasaService("Gallery");
    
    var photoQuery = new PhotoQuery(PicasaQuery.CreatePicasaUri("GOOGLEUSERNAME", "GALLERYID"));
    // add the extra parameter to request full size images
    photoQuery.ExtraParameters = "imgmax=d";
    
    var photoFeed = picasaService.Query(photoQuery);
    
    var data = photoFeed.Entries;
    

提交回复
热议问题