This is in python, but it may be analogous: http://cychong.wordpress.com/2011/03/24/download-original-pictures-from-the-picasaweb/
On May 12, 1:57 pm, Philipp <[email protected]> wrote: > Hey there, > > I know this has been asked before, but I couldn't find a working > solution. I'd like to download the original image (not scaled, not re- > calculated) from Picasa using the Java Client API (http:// > code.google.com/p/google-api-java-client/). > > Here is what I've tried / looked at: > > - I've tried the code from stackoverflow [1] that uses the > PhotoEntry.getMediaSource() method, but it always returns "null". > > - I tried the PhotoEntry.getMediaContents() method, but it returns an > object of the type > "com.google.gdata.data.media.mediarss.MediaContent", not > "com.google.gdata.data.MediaContent", so there is no getInputStream() > method. > > - I've tried the following code, but it returns an InputStream to a > JPG file, even though I uploaded a PNG: > > MediaContent media = (MediaContent) photoEntry.getContent(); > MediaSource mediaSrc = picasaWebService.getMedia(media); > // get file with mediaSrc.getInputStream() > > - I also read about the "imgmax=d" [2] trick, but I couldn't figure > out how to get it to work with the client API. > > I really have no idea what to do. Any ideas? > > Thanks in advance, > Philipp > > [1]http://stackoverflow.com/questions/4515830/how-do-i-download-images-f... > [2]http://code.google.com/apis/picasaweb/docs/2.0/reference.html#Parameters -- You received this message because you are subscribed to the Google Groups "Google Picasa Web Albums API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-picasa-data-api?hl=en.
